GithubHelp home page GithubHelp logo

slicerrt / slicerdebuggingtools Goto Github PK

View Code? Open in Web Editor NEW
23.0 10.0 6.0 3.82 MB

Extension for 3D Slicer containing various tools for module development and debugging

License: BSD 3-Clause "New" or "Revised" License

Python 92.37% CMake 7.63%
3d-slicer-extension

slicerdebuggingtools's Introduction

slicerdebuggingtools's People

Contributors

carjohnson avatar jamesobutler avatar jcfr avatar lassoan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slicerdebuggingtools's Issues

PyCharm debug connection issue - attach_amd64.dll

When trying to connect PyCharm (version 2020.3.5) to Slicer (version 4.11.0-2020-09-22) I am constantly getting an error saying

Expected: /PyCharm 2019.3.3\debug-eggs\pydevd-pycharm.egg\pydevd_attach_to_process\attach_amd64.dll to exist.

but I am not sure how to fix this.

Add note to documentation wrt VS Code `launch.json` template

Currently the template for launch.json comes up with something similar to

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Remote Attach",
            "type": "python",
            "request": "attach",
            "connect": {
                "host": "localhost",
                "port": 5678
            },
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}",
                    "remoteRoot": "."
                }
            ],
            "justMyCode": true
        }
    ]
}

But with a development setup (i.e. slicer built from source) the pathMappings parameter here might the debugger from stepping into slicer python code, this might also be a problem how i set up the workspace though, but removing the pathMappings entry allowed stepping into the base slicer python

Debugging with Eclipse and PyDev v7.3.0

I have been using Eclipse to debug my Python code with PyDev v7.0.3
When I updated the PyDev module to version 7.3.0 through the Eclipse IDE, Slicer was no longer able to connect. The following error message appeared in the Python Interactor

Traceback (most recent call last):
File "C:/Users/cjohnson/AppData/Roaming/NA-MIC/Extensions-28438/DebuggingTools/lib/Slicer-4.11/qt-scripted-modules/PyDevRemoteDebug.py", line 158, in setup
if self.logic.isConnected():
File "C:/Users/cjohnson/AppData/Roaming/NA-MIC/Extensions-28438/DebuggingTools/lib/Slicer-4.11/qt-scripted-modules/PyDevRemoteDebug.py", line 575, in isConnected
return pydevd.connected
AttributeError: module 'pydevd' has no attribute 'connected'

Comparing the pydevd.py scripts for both versions shows that in 7.3.0 there is no longer a global variable 'connected'.
This error leaves the Slicer Debugger module in a strange state - not allowing me to change the location of the pydevd.py file back to the older version. I had to manually change this in the Slicer.ini file.

I am using Slicer version 4.11.0-2019-08-13

Error when trying to auto-connect using qt5

Using the Windows nightly that had qt5 (from 01/19).
When checking the "Auto-connect on next application startup" checkbox, an error is sometimes thrown, as seen below:
image

This seems to stem from what is returned from QSettings.value() when the value set is a boolean. From what I can tell from my bit of testing, this happens regardless of if the value is either True or False, sometimes returning u'true' or u'false' or the boolean equivalents. When boolean is returned is when the error occurs, due to the lack of a .lower().

I've had trouble testing further as it seems it happens when the settings get written to and read from a file rather than just setting a value and reading it from QSettings().

pycharm-debug.egg missing

I have a professional PyCharm, and I followed the wiki tutorials but in my debug-eggs folder i only see pydevd-pycharm.egg. I don't see any pycharm-debug.egg

PyCharm 2019.1.3 (Professional Edition)
Build #PY-191.7479.30, built on May 29, 2019
JRE: 11.0.2+9-b159.60 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-54-generic

on Slicer 4.11.0-2019-07-19 r28397

Ubuntu 16.04 LTS

Any comment is appreciated

Error starting connection to PyCharm

When I try to connect to PyCharm from the latest nightly version of Slicer, I get the following error message when I click "Connect to debug server":

image

Note that this error does not occur with older versions (e.g. Slicer 2017-06-26), where I can successfully connect.

OS: Windows 10
Slicer: Slicer 2017-07-20 (latest nightly)
PyCharm: 2017.1

Slicer log file attached.
Slicer_26159_20170721_103713.txt

Update Visual Studio instructions

The current information is valid for older versions of Visual Studio 2017. On an up to date VS2017, I needed to use the legacy debugger. Debugging was possible - good. But as older versions of Visual Studio go out of support, it would be good to add information/support for newer versions (e.g. VS2022).

No error message if import ptvsd failed

When the button is clicked, the window pops up as if everything is normal, then it disappears
When the window pops up, and there is an error it is reported in the Python console in red.
However, I am afraid when users don't have the Python console shown, they have no idea what is going on.
output_wnpwg5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.