![]() |
debugging help on Visual Studio Code - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: debugging help on Visual Studio Code (/thread-38272.html) Pages:
1
2
|
debugging help on Visual Studio Code - mg24 - Sep-24-2022 Hi Team, I want to take cursor to previous line on visual studio code editor. tried on pycharm also it didn't worked. Can we jump back to previous line.?... Attached Snapshot of code. RE: debugging help on Visual Studio Code - deanhystad - Sep-24-2022 You cannot go to a previous line in any debugger that I am aware of. If you want to stop on the previous line, set a beakpoint on the previous line and re-run. RE: debugging help on Visual Studio Code - mg24 - Sep-24-2022 Hi Deanhystad, Thanks for the info, Actually I come from VBA Background , excel automation via Macro. there that option was there hence asked. Thanks mg RE: debugging help on Visual Studio Code - snippsat - Sep-24-2022 Can use Debug: Jump to Cursor command in command ctrl+shift+p Click on desired line and use this command the debug will jump to line where cursor is placed. RE: debugging help on Visual Studio Code - mg24 - Sep-30-2022 Hi snippsat , When clicked ctrl+shift+p , cursor is not moving to backword, only I am getting pop window of command palate Cursor was at line 16 and I wanted to move to line 14, using ctrl+shift+p its not working. I am using Visual Studio Code. Thanks mg RE: debugging help on Visual Studio Code - deanhystad - Sep-30-2022 That is what you should get. Then you have to select Debug: Jump to cursor in the command palette. RE: debugging help on Visual Studio Code - Larz60+ - Sep-30-2022 highlight target line, then click ctrl+shift+p RE: debugging help on Visual Studio Code - deanhystad - Sep-30-2022 Maybe it is just semantics, but I don't think jump to cursor can be used to go back to the previous command. Jump to cursor just sets the program counter. It doesn't undo the command, giving me a view of the program state prior to executing the previous command. If the previous command was "x = x + 1" and x is currently 5, jumping to the previous command does not restore x = 4. x is still 5. If all you want to do is execute arbitrary commands, I'd just copy and paste the command into the debug terminal. If you want to run multiple commands in order I guess it makes sense to jump to cursor and then run to cursor. RE: debugging help on Visual Studio Code - snippsat - Sep-30-2022 Quote:cursor is not moving to backword,Yes.and then have to start typing Debug: Jump to Cursor command and choose it.![]() RE: debugging help on Visual Studio Code - mg24 - Oct-01-2022 Hi snippsat, Superrrrrrrrrrrb ! very happy , thanks for for your help, ![]() one more help if you can , In pycharm another ide how to achieve this thing. Thanks mg |