Author Topic: Debugging in SlickEdit  (Read 1847 times)

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Debugging in SlickEdit
« on: February 10, 2025, 10:17:16 AM »
Dear All,
I am in SlickEdit 28.0.1 on Windows 11 and I am trying to debug a single file Python project, i.e. a Python source file. I click on Debug and Start, get the debugging menu, but then SlickEdit says that the socket shut down (please see attached image). How can I solve this?

Best Regards,
George

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #1 on: February 10, 2025, 01:34:13 PM »
What version of Python are you using?

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #2 on: February 10, 2025, 02:45:49 PM »
Dear Clark,

3.13.

Best Regards,
George

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #3 on: February 10, 2025, 04:44:35 PM »
There seems to be an issue with that version.  We will look into this.


As a work around, install 3.12

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #4 on: February 10, 2025, 04:52:36 PM »
We will add a fix for this to v29.

For v28, you'll have to edit this file:

<SlickEdit-Install-Path>\resource\tools\ptvsd\_vendored\pydevd\_pydev_bundle\pydev_is_thread_alive.py

Change t.isAlive() to t.is_alive()

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #5 on: February 12, 2025, 12:26:36 PM »
Dear Clark,

That would be the attribute that was deprecated from Python, I have seen this in other tools as well. The problem is that when I visited the directory you mention, there is no file by that name and when searching the files with thread in their name, I could not find any reference to isAlive().

Best Regards,
George

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #6 on: February 12, 2025, 12:33:00 PM »
File to edit is here:

"C:\Program Files\SlickEdit Pro 28.0.1\resource\tools\ptvsd\_vendored\pydevd\_pydev_bundle\pydev_is_thread_alive.py"

You'll need administrator privileges or you won't be able to edit it.

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #7 on: February 12, 2025, 04:50:13 PM »
Dear Clark,

Found it and made the edit, many thanks.

Best Regards,
George

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #8 on: February 13, 2025, 01:03:34 PM »
Dear Clark,

Made the change, restarted SlickEdit, rebooted the computer, but debugging still fails with the same error message. What else can I try?

Also, when I restarted SlickEdit, I went back to the previous problem with the Execute menu greyed out (as in my other post), so I can no longer run single-file Python projects. Any ideas?

Best Regards,
George

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #9 on: February 13, 2025, 01:10:13 PM »
What happens if you run an older version of Python?

Make sure you uninstall the newer Python version so SlickEdit doesn't just keep using it.

Not sure what could be going on with the grayed out menu items.
« Last Edit: February 13, 2025, 01:13:07 PM by Clark »

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #10 on: February 13, 2025, 11:47:25 PM »
Dear Clark,

I uninstalled 3.13 and installed 3.12. If I have the Python file as part of a Python project, I can run the execute command. If I have it as a stand-alone file project, then all commands in the Build menu are greyed out. The debugger fails with the same message as in 3.13 in both cases.

If it helps, these problems started since I tried the Attach Debugger for Python option, but then I uninstalled SlickEdit with the user preferences as well and used a programme (Revo Uninstaller) in order to delete leftovers as well and did a clean re-install as well. Any ideas?

Best Regards,
George

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #11 on: February 14, 2025, 03:19:14 AM »
Try to rule our a SlickEdit config issue by using a default configuration. Sounds like Python file projects are broken due to a configuration change.

Start with new config like this:

vs -sc c:\temp\newconfigdir

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #12 on: February 14, 2025, 06:58:49 PM »
Dear Clark,

I did this and the Build menu options seem to be the ones referring to a Python project, not a single-file one. The debugger fails with the same error message.

Best Regards,
George

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7041
  • Hero Points: 535
Re: Debugging in SlickEdit
« Reply #13 on: February 14, 2025, 07:19:37 PM »
Single file projects are only active when there is no workspace open. You must close your workspace.

gkl

  • Community Member
  • Posts: 25
  • Hero Points: 0
Re: Debugging in SlickEdit
« Reply #14 on: February 17, 2025, 09:21:18 AM »
I don't think I have any workspace open, this is how I add the file - that would count as a single-file project, would it not?