Welcome!

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

SignUp Now!

WAD Here's an example of NOT stepping over a statement

Jan
179
2
Here's an example of a statement that I didn't want to execute because it's a backup that runs for 10 hours and so I choose to step over it and here it is executing anyways.
Screenshot_20260617_234258_RVNC Viewer.webp
 
Do you redefine the entire dictionary or just what suits you? I've used professional IDE's before and step over means don't execute.
 
That's not stepping over. That's executing to the next statement which could just be set with a breakpoint. If you look in CMDebug in the Debug menu Skip this Line is associated with a white dot and I would expect that you would set that similar to a breakpoint only it causes your debug execution to skip over a statement without you needing to manage it. That makes sense. Although it doesn't seem to work. Skip Over on the other hand would be useful while your sitting going through a script and realize that executing the next line will cause problems so you step over it.
 
When I attempted to breakpoint the line I didn't want to execute and then used the Go To line to the line after it jumped down several lines. I already knew that Step-over wasn't going to work.

::breakpoint
:ArchiveBitCheck
Call LogFileLine.cmd %DBCallingName% "Archive bit check begin" >> "E:\Backup\BackupLogs\%2Drive%3Backup.log"

This next line is where the breakpoint was.

Call "C:\Program Files\PowerShell\7\pwsh.exe" "E:\Backup\BackupScripts\ArchiveBitCheck.ps1" %2 %3 >> "E:\Backup\BackupLogs\%2Drive%3Backup.log"

The next line was the one I attempted to make current.

Call LogFileLine.cmd %DBCallingName% "Archive bit check end" >> "E:\Backup\BackupLogs\%2Drive%3Backup.log"


::breakpoint
:Terabyte
Call LogFileLine.cmd %DBCallingName% "Terabyte backup start" >> "E:\Backup\BackupLogs\%2Drive%3Backup.log"

This was the line that the debugger made current

Call E:\Backup\BackupScripts\IFWBackupRotate.cmd %1 %2 %3 %4 %5 %6 >> "E:\Backup\BackupLogs\%2Drive%3Backup.log"

Did it run the intermediate lines or just ignore them?

The second, third and fourth time through it blew right past the first breakpoint.

Well it broke on a new breakpoint I put on a multi-line IF that seems like something may have been fixed. But more interestingly after I've been told over and over again it wouldn't step through a multi-line IF it stepped through every line. I'm not complaining but making an observation.

It still blew past the breakpoint I had set previously even after I closed it all down and reloaded the script.

I also had yet another weird NotePad++ error where it included a 0x01 at the beginning of a informational log item.
 
Last edited:
Do you redefine the entire dictionary or just what suits you? I've used professional IDE's before and step over means don't execute.

Visual Studio (and every other debugger I've used for the last 30 years) behave exactly this way.

I would be very interested in hearing about a debugger that doesn't do this; please provide examples.
 
That's not stepping over. That's executing to the next statement which could just be set with a breakpoint. If you look in CMDebug in the Debug menu Skip this Line is associated with a white dot and I would expect that you would set that similar to a breakpoint only it causes your debug execution to skip over a statement without you needing to manage it. That makes sense. Although it doesn't seem to work

I don't know what you mean by "Skip this Line is associated with a white dot". The icon for that menu entry is a down arrow in a circle. (Clear All Breakpoints has a white circle icon.)

Skip this Line works here - what is it doing for you?
 
When I attempted to breakpoint the line I didn't want to execute and then used the Go To line to the line after it jumped down several lines. I already knew that Step-over wasn't going to work.

I don't know what you mean by "used the Go To line". If you want to skip multiple lines while you're debugging, move the cursor to the line you want to skip to, and then select the "Debug / Jump to This Line" menu entry.

If you're using the "Find / Go To..." menu entry, that is for editing or browsing the file, and does not affect the execution pointer in the debugger.
 
I don't know what you mean by "Skip this Line is associated with a white dot". The icon for that menu entry is a down arrow in a circle. (Clear All Breakpoints has a white circle icon.)

Skip this Line works here - what is it doing for you?
OK brain fart on the icon. I'm going in too many directions at once. Regardless of the fact that this is essentially a copy of MS ISE, MS makes terrible choices at almost every turn. Just because they're a big corporation doesn't mean their analysis or design is good. They're going to double down on Window's 11 even after the first adopters are literally looking at Linux which is a far cry from the functionality of the Window's GUI.

This is Microsoft's official usage of these commands.

Screenshot_20260621_151429_RVNC Viewer.webp


Read the functionality of the Step-Over again. In the first sentence they tell you they are skipping functions and invocations. In the second sentence they're telling you that any skipped statements are executed. Wow!

This will take a little setup to make my case. I borrowed this from my backup script. A verification of a command line parameter.

The parameter value is 0.

Because it's a nested if your current line will be 1, 11, 12 or 13.

My step-over would be useful on line 6 or 10 to skip the executions of the called module entirely but not possible.

I haven't tried the step-out yet but I can only imagine. Since we cannot set anything on command structures like nested if's I'm not sure where this would function?

1 If "%~5"=="" goto Finish

2 if %5 geq 0 (
3 If %5 leq 365 (
4 goto Parm5OK
5 ) else (
6 Call LogFileLine.cmd %DBCallingName% "Invalid Differential Backup Max Must Be 1-365" >> E:\Backup\BackupLogs\%Drive3Backup.log"
7 goto Finish
8 )
9 ) else (
10 Call LogFileLine.cmd %DBCallingName% "Invalid Differential Backup Max Must Be 1-365" >> E:\Backup\BackupLogs\%Drive3Backup.log"
11 )
12 :Parm5OK

13 If "%~6"=="" goto Finish

My initial post is yet going to execute without loading the source for two reasons. It can't load the source because it's an exe and it doesn't skip execution just source loading. Step-over is a real misnomer.
 
Back
Top