microsoft / vscode-python-web-wasm

An extension allows to run Python code in a Web browser using WebAssembly technology
MIT License
78 stars 11 forks source link

Debug always stop in the first line #33

Closed paulacamargo25 closed 1 year ago

paulacamargo25 commented 1 year ago

Testing https://github.com/microsoft/vscode/issues/167433

When i debug a python file, the debug process stop always at the first line, even if i don't have a breakpoint there. It should only stop where I have breakpoints set.

Screenshot 2022-11-29 at 3 38 08 PM
rchiodo commented 1 year ago

This is on purpose. stopOnEntry defaults to true for the pdb based debugger.

You can change this by creating a launch.json that specifies stopOnEntry as false.

rchiodo commented 1 year ago

The reason I made 'stopOnEntry' as true the default because of the thought that this would be used by people unfamiliar with debugging. The assumption being novice users wouldn't even know what a breakpoint was.

dbaeumer commented 1 year ago

I actually like the behavior as well since users can't set breakpoints when the code runs due to the limitations we have with pdb.