ide/bdebugger

Aug 9, 2009
228
1
TCC 25.00.7 x64 Windows 10 [Version 10.0.18362.295]

ide/debugger

running a script inside the ide the script fails to run
1) fails to see loaded plugins.

running script on its own no errors runs as expected

also noticed if i use gosub "path\script" xgen
the script must have a blank line top of code other wise it fails to
find the label
 
Aug 9, 2009
228
1
ide /c path\script.btm
when running in the ide the script fails in debugger.
1) I see another console window behind the debugger with the errors
which tells me that its a plugin function that its having trouble with

--- the plugin is 4UTILS: @MRAND @MRANDSEED
these two functions that cause errors while running inside the ide. how ever!
if not running in ide/debugger no errors eveything runs as expected.
 
Aug 9, 2009
228
1
more info;
the functions are in another script which i call with gosub "path\seek.bt" xgen
this script creates pure randomized numbers.

may be the ide has problems when calling an external gosub routine
 
May 20, 2008
11,388
99
Syracuse, NY, USA
I have no trouble with @MRANDSEED and @MRAND. What are the error messages?
1565924783174.png
 
Aug 9, 2009
228
1
if i use 0 as seed the numbers generated become predictable at any given time daily,
i use it like this example @mrandseed[%@random[1,10000]]
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
more info;
the functions are in another script which i call with gosub "path\seek.bt" xgen
this script creates pure randomized numbers.

may be the ide has problems when calling an external gosub routine

Not reproducible here - please post a (hopefully simplified) sample batch file that shows the problem.
 
May 20, 2008
11,388
99
Syracuse, NY, USA
I also have no problem calling a subroutine in another BTM. But there is a BDEBUGGER problem. I give this command.
Code:
BDEBUGGER mrandtest.btm
and I see this.
1565925710834.png


I press "Go" and then "Step into" repeatedly until debugging stops. Now I'm here (with no apparent way of repeating the debugging session).
1565925864469.png
 
May 20, 2008
11,388
99
Syracuse, NY, USA
if i use 0 as seed the numbers generated become predictable at any given time daily,
i use it like this example @mrandseed[%@random[1,10000]]
Did you test that? You won't convince me. It has nothing to do with the time of day. When you specify 0 it uses the value of the Windows performance counter, a 64-bit number which (here) changes 10,000,000 times a second and which won't repeat for about 60,000 years.
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
I also have no problem calling a subroutine in another BTM. But there is a BDEBUGGER problem. I give this command.
Code:
BDEBUGGER mrandtest.btm
and I see this.
View attachment 2462

I press "Go" and then "Step into" repeatedly until debugging stops. Now I'm here (with no apparent way of repeating the debugging session).
View attachment 2463

The problem is when the child batch file tries to return the parent isn't there anymore (edge condition, not new to v25). If you had another line (even "echo.") after the enddo, it would have returned to mrandtest.btm.

I've added a workaround for build 8.
 
Aug 9, 2009
228
1
simplified scripts if run from cmdline no problem problem is when run inside ide

i found the code in simple_2 years ago on klaus meinhard 4dos.info site it was originally an lotto type generator and just modified it to suit my needs.
 

Attachments

  • Simple_1.btm
    101 bytes · Views: 91
  • Simple_2.btm
    343 bytes · Views: 90

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,447
88
Albuquerque, NM
prospero.unm.edu
Going back to the original question:

Forgive me if this is bloody obvious, but... you are aware that IDE and BDEBUGGER launch a new shell, right? Plugins loaded in the parent shell are not inherited by the new one. The child shell must load its own plugins, either automatically because they're in the PLUGINS directory, or else via the PLUGIN command, e.g. in 4START.BTM.
 
Aug 9, 2009
228
1
Thank you all.

charles, tcc-v24 i was having trouble with plugins reloading in the IDE automatically as it complained about plugin already loaded. in tcc-v25 i get no errors about them because they arent thanks.! both version behave differently about plugins while in the IDE.

I've changed the startup to reflect this with v25 now all is good.
 
Similar threads
Thread starter Title Forum Replies Date
T Thanks for the assistance with IDE vs Bdebugger Support 3
rps IDE/BDEBUGGER ? Support 1
Peter Murschall v24 IDE/BDEBUGGER won't start Support 9
C BDEBUGGER/IDE crashing Support 1
T bdebugger / ide usage confusion Support 14
Frank watch an array variable in ide/bdebugger Support 2
JohnQSmith IDE / BDEBUGGER Crash Support 0
JohnQSmith IDE / BDEBUGGER Font Support 4
B Bdebugger / IDE editor doesn't display called batch file Support 1
mikea BDEBUGGER/IDE questions Support 16
P BDEBUGGER/IDE does not honour VariableExclude Support 2
P bdebugger / ide issues Support 1
Peter Bratton v10 IDE / bdebugger Support 10
Kachupp IDE watch references Support 11
vefatica IDE external command syntax color? Support 1
K_Meinhard Small problem in german IDE 26 Support 3
vefatica IDE - when breakpoint is on a blank line? Support 3
Peter Murschall IDE: After undocking the command expansion Window is offended Support 2
Peter Murschall IDE: Ctrl-W is a Harakiri Command ! Support 23
vefatica IDE.EXE's command line? Support 19
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
vefatica IDE stuck on "Insert tabs as spaces" Support 0
Peter Murschall IDE/BDEBUUGER in TCC 22 didn't run Support 7
T Fixed Problem with use of Batch parameters in the IDE Support 1
T Fixed IDE locks up if edit window for running batch is closed Support 6
Peter Murschall IDE destroys Text on Ctrl-U/Ctrl-Shift-U Support 12
vefatica Monospace font in IDE? Support 3
vefatica IDE crashes every time Support 6
R TCC IDE Tabs - inactive tabs hard to see Support 14
vefatica IDE crashing Support 11
vefatica Why doesn't "IDE %_ININAME" work? Support 4
vefatica IDE's dynamic help ... Support 0
vefatica Contuing IDE gripes Support 11
vefatica WAD IDE, output window to foreground Support 3
vefatica Fixed IDE weirdness Support 3
vefatica IDE double-click select? Support 29
vefatica Doesn't IDE auto-indent? Support 3
vefatica Fixed Font corruption in IDE Support 3
vefatica IDE status bar row/column? Support 0
vefatica An IDE anomaly Support 2
T Associating BTM files with IDE results in DOS box Support 33
S WAD IDE /C does not accept truename of future file Support 13
S How to? Is it possible for the IDE to start without plugins? Support 3
S Documentation "HELP IDE" - missing reference Support 0
Mordachai Fixed Closing TCMD while IDE + Help Open = Crash Support 7
jwiede ide.exe not launching? Support 13
F No ide.exe or tcmd.exe files - Win7 64bit Support 5
T Syntax highlighting in the IDE Support 8
Peter Murschall Is IDE forbidden in TCSTART.BTM ? Support 4
rfaquino TCMD 14.0 IDE Crash Support 7

Similar threads