SageMath and VScode

1,558 views
Skip to first unread message

ph h

unread,
Apr 13, 2022, 4:33:14 AM4/13/22
to sage-devel
Dear All,

There was a related discussion here:


Is there any way to debug SageMath using VScode client on Windows and  server on "remote WSL" (on the same machine)?

Your advice is much appreciated.

Regards,

phiho

Matthias Koeppe

unread,
Apr 13, 2022, 11:42:47 AM4/13/22
to sage-devel
See https://trac.sagemath.org/ticket/30484 - help is welcome in writing instructions for our documentation

ph h

unread,
Apr 13, 2022, 3:51:14 PM4/13/22
to sage-...@googlegroups.com
Hi,

phiho has been struggling to step into python code from the shell scripts without success.
(After installing VSCode client on Windows, remote WSL, Python and Bash Debug extensions)

He couldn't interact with Sage console started in the DEBUG CONSOLE of VSCode (after stepping through sage/sage and sage/src/bin/sage)

Any hint on how to achieve these two things is much appreciated.

Please find attached a screen capture of VSCode.

Regards,

phiho


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/3bc35300-2454-4d5b-a0de-6f62391f846an%40googlegroups.com.
VSCode.jpg

Tobias Diez

unread,
Apr 14, 2022, 1:27:36 PM4/14/22
to sage-devel
VS code cannot debug python code that is executed by a shell script. You have to execute python code directly in order to debug it. My strategy usually is to create a new (temporary) python file that contains the code I want to debug (or calls the method I want to debug), and then use the python debug launch config to debug it.

ph h

unread,
Apr 14, 2022, 7:02:31 PM4/14/22
to sage-...@googlegroups.com
Hi,

> VS code cannot debug python code that is executed by a shell script.

It looks like he has set the expectation too high.

> My strategy usually is to create a new (temporary) python file that contains the code I want to debug (or calls the method I want to debug), and then use the python debug launch config to debug it.

Thank you for your sharing, it is very helpful

Again, thank you for your response.

Regards,

phiho


Reply all
Reply to author
Forward
0 new messages