Welcome!

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

SignUp Now!

Not Defined Not Working

Jan
179
2
Here is my test.bat showing each condition works in batch.

Screenshot_20260621_190436_RVNC Viewer.webp


And here it is running in CMDebug not working.

Screenshot_20260621_190217_RVNC Viewer.webp
 
So I commented out the offending If statements, not something I really wanted to do because it get's confusing as to what's real code that's commented out that needs to go back in. But I wanted to try to get through this. Unfortunately, when I then breakpointed the following If structure at the top and the bottom and then ran to breakpoint it blew through both of them without stopping. Didn't see that coming. So I breakpointed every line in the if thinking maybe it was the nested one that needed the breakpoint. The rules aren't consistent. But it blew through all 10 of them.

Screenshot_20260621_193719_RVNC Viewer.webp
 
Not sure what you mean here -- BDEBUGGER is displaying "defined", which is what you got at the prompt that you said was working.

Why are you using the CMD FOR variable syntax %~1 (which means "%1 with enclosing quotes stripped") instead of just a %1?
See the image of CMDebug. It says it's defined. It is not there's no input. And the comparison is what really happens with out the debugger where it works correctly.
 
Not sure what you mean here -- BDEBUGGER is displaying "defined", which is what you got at the prompt that you said was working.

Why are you using the CMD FOR variable syntax %~1 (which means "%1 with enclosing quotes stripped") instead of just a %1?
There was nothing defined. There was nothing in the batch arguments box.

I didn't need the ~ but it didn't hurt anything either.
 
I can't explain the reason the debugger came back with "defined". There was no command argument supplied. When I did it again it seemed to work correctly.
 
Back
Top