Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD BDEBBUGER not working properly when debugging a batch file

Jul
68
1
I've been getting errors (like "Syntax Error" on the first line of my batch file when it's just simply an "@echo off" command) while debugging a batch file. Also, the internal return code always seems to be 2, regardless of what result the command should be returning. This prevents commands like "MSGBOX" and "TASKDIALOG" from working properly while debugging, where the exit code is dependent on what button you click on. None of this happens when running the batch file outside of the debugger, or when using the "Start without debugging" option.
Using newest Take Command:

TCC 30.00.22 x64 Windows 11 [Version 10.0.22621.1848]
TCC Build 22 Windows 11 Build 22621
Registered to MARK7-WIN11

Running Windows 11 Pro

Mark E.
 
In a very simple test, _? was correct in the debugger. Do you have a simple test in which it fails? Below, I pressed button 1.

1689017090271.png

1689017116838.png
 
In a very simple test, _? was correct in the debugger. Do you have a simple test in which it fails? Below, I pressed button 1.

View attachment 4083
View attachment 4084

That's odd, because your test seems to work fine, even when debugging it as a batch file. There must be something wrong with my script, but I don't know what it would be, because the very first command is @echo off and that shouldn't cause any errors, but it gave me a "Syntax error" message (only while debugging). As a test, I put @echo off as the first command in your test script and it also worked fine in the debugger. So it's a mystery. Maybe it has to do with an ON ERROR statement that I put in later in my batch file?

And yes, I did try rebooting the computer first.

Mark E.
 
Now this is really odd. I tried copying the batch file to a different directory, tried to debug the copy, and everything is fine. Weird.

Here is my directory list. The file is for a script called summary.btm


Volume in drive C is OS Serial number is 9ad0:8dd4
Directory of C:\Users\Mark\batch\sum*.*

7/10/2023 11:57 1,997 summary.btm
7/10/2023 12:55 90 summary.btm.bp
7/10/2023 12:55 48 summary.btm.watch
2,135 bytes in 3 files and 0 dirs 12,288 bytes allocated
178,934,648,832 bytes free

---------


Volume in drive C is OS Serial number is 9ad0:8dd4
Directory of C:\Users\Mark\batch\sum*

7/10/2023 11:57 1,997 summary.btm
7/10/2023 12:55 90 summary.btm.bp
7/10/2023 12:55 48 summary.btm.watch
2,135 bytes in 3 files and 0 dirs 12,288 bytes allocated
178,934,652,928 bytes free
 
Deleting the *.bp and *.watch files associated with the batch file in the original directory also seemed to fix the problem. Mystery solved, although I don't know how a corrupted *.bp or *.watch file could give me the errors I got while debugging.

Mark E.
 

Similar threads

Back
Top