# Debugging Issues using VS Code

**URL:** <https://discourse.slicer.org/t/debugging-issues-using-vs-code/35291>\
**Category:** Support\
**Tags:** debug\
**Created:** [April 4, 2024, 3:45pm UTC](https://discourse.slicer.org/t/debugging-issues-using-vs-code/35291 "2024-04-04T15:45:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Istvan](https://avatars.discourse-cdn.com/v4/letter/i/3da27b/32.png) [@Istvan](https://discourse.slicer.org/u/Istvan)\
**Post date:** [April 4, 2024, 3:45pm UTC](https://discourse.slicer.org/t/debugging-issues-using-vs-code/35291/1 "2024-04-04T15:45:22Z")

</div>

Hi,

Windows version: 10.0.19045  
Slicer Version: 4.11.20200930 r29402 / 002be18  
VS Code version: 1.87.2

in order to make a debugging in VS Code using the `Python debugger` module of Slicer I´ve followed the instructrions written in [GitHub - SlicerRt/SlicerDebuggingTools: Extension for 3D Slicer containing various tools for module development and debugging](https://github.com/SlicerRt/SlicerDebuggingTools)  
I’ve saved the following simple script into the working directory:  
for i in range(3):  
print(i)

I’ve started the connection with the debug server in the Slicer and after that the debugging in VS Code. The process seem to work (at least I haven’t got any error messages), however at the debugging tab the buttons _step over, step into and step out_ are greyed out. I can place breakpoints into the script, but the debugging itself does not work. Any suggestions how I can fix this problem? Thanks in advance. Istvan

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 4, 2024, 3:51pm UTC](https://discourse.slicer.org/t/debugging-issues-using-vs-code/35291/2 "2024-04-04T15:51:03Z")

</div>

Your script is executed line-by-line, so breakpoints will not work there. However, you don’t really need it, as you can just use the Python console or Jupyter notebooks (SlicerJupyter extension) to run code snippets and inspect the results.

You can use breakpoints when debugging code in your module. When you make any modifications then you can reload the module by a single click.
