Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Debugging in Python WASM #167399

Closed
2 tasks done
dbaeumer opened this issue Nov 28, 2022 · 8 comments
Closed
2 tasks done

Test: Debugging in Python WASM #167399

dbaeumer opened this issue Nov 28, 2022 · 8 comments

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Nov 28, 2022

Refs: microsoft/vscode-python-web-wasm#31

Complexity: 4

Authors: @rchiodo

Create Issue


Testing has to happen in a Chrome based browser (e.g. Google or Edge)

  • open a Python sample repository from Github inside insiders.vscode.dev. If you need one, you can use https://insiders.vscode.dev/github/dbaeumer/python-sample?vscode-coi=
    Ensure that you add the query parameter ?vscode-coi= to the URL
  • install the latest pore-release version of Experimental - Python for the Web (should be 0.7.0)
  • open a Python file (e.g. app.py)
  • Execute the file by using the editor's Run menu
    image
    Make sure that the file gets executed and the result is printed into the terminal.
    Note that the first execution can take some time due to the caching of GitHub files.
  • Debug the Python file using the same Run menu
    Ensure that:
    • VS Code switches into debug mode
    • You can step over and step into statements
    • The Output is printed into the debug console
  • Create a launch config (e.g.)
      	{
      		"type": "python-web-wasm",
      		"name": "Debug Active Python File",
      		"request": "launch",
      		"program": "${file}",
      		"stopOnEntry": true,
      		"console": "integratedTerminal"
      	}
    
  • Start debugging using the launch configuration
    Ensure: that the output is printed to the integrated terminal and not to the console.
  • Debugger features to test:
    • Set breakpoints and make sure they are hit
    • Step into and out of functions and make sure the callstack shows the function and the caller
    • Run code across more than one module (import another file from the same workspace)
    • Type variables into the watch window and make sure you can get the values
  • Open a local folder and attempt running and debugging there too (in addition to a remote repository)
@vscodenpa vscodenpa added this to the November 2022 milestone Nov 28, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Nov 28, 2022

I can't edit the original text, but I'd add:

  • Open a local folder and attempt running and debugging there too (in addition to a remote repository)
  • Set breakpoints and make sure they are hit
  • Step into and out of functions and make sure the callstack shows the function and the caller
  • Run code across more than one module (import another file from the same workspace)
  • Type variables into the watch window and make sure you can get the values

@dbaeumer
Copy link
Member Author

Added Rich's list to the test steps

@ghost ghost assigned paulacamargo25 and alexr00 Nov 29, 2022
@alexr00
Copy link
Member

alexr00 commented Nov 29, 2022

Debug the Python file using the same Run menu

This took over a minute before debugging started, even though I had previously run the file without debugging much faster.

@dbaeumer
Copy link
Member Author

I noticed that yesterday as well and opened microsoft/vscode-python-web-wasm#30 for me.

But then when trying to track it down wasn't able to do so. Need to investigate again.

@alexr00 are you still setting it?

@dbaeumer
Copy link
Member Author

@paulacamargo25 please see @alexr00 comment here: #167399 (comment).

So please be patient. Will try to understand what is happening.

@alexr00
Copy link
Member

alexr00 commented Nov 29, 2022

No, it only seemed to be the first debug.

@alexr00
Copy link
Member

alexr00 commented Nov 29, 2022

I switched browsers so as to have fresh state and the very slow first debug occurred again.

@dbaeumer
Copy link
Member Author

@alexr00 thanks for the info.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants