skip to Main Content

I have started a Python script in VS Code’s debugger and have hit a breakpoint. I can examine the state in Debug Console.

Now I would like to call a method with parameters from within the Debug Console and follow (debug) it’s execution.

Screenshot showing Debug Console with a function call typed in, and in the main pane, a breakpoint is set inside that function.

I’ve set a breakpoint in the method I call, but it is ignored: Debug Console immediately returns the result from the method, instead of interrupting at the breakpoint. Seems like debugging in Debug Console is not supported.

Any idea how to debug from Debug Console?

2

Answers


  1. The code information you provided is too little, I give a possible answer:

    Maybe the location of your breakpoint contains a method belonging to another package. You could add "justMyCode": false to your launch.json.

    Login or Signup to reply.
  2. You can try this:

    1. Set breakpoints within the method.
    2. Start debugging (run button dropdown or F5, according to your keybindings).
    3. Use step controls (F10, F11, Shift+F11, according to your keybindings) to navigate.
    4. Inspect method variables in the Variables pane. 🚀
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search