• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Python debugger anyone ?

New Here ,
Nov 11, 2024 Nov 11, 2024

Copy link to clipboard

Copied

Hi guys.

Does anybody have a reliable recipe for attaching the Visual Code debugger to a Painter Python plugin? I've tried a couple of ways, but I've had no luck so far. 

TOPICS
Discussion , Scripting

Views

40

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
3 hours ago 3 hours ago

Copy link to clipboard

Copied

LATEST

I have it working using debugpy and visual studio code, so should be possible to use VS to attach.

# debugpy errors out if you don't set os.__file__:
import os
import inspect
os.__file__ = inspect.getfile(lambda: None)
import debugpy

# The python exe must be the same python version that Painter uses:
debugpy.configure(python="path/to/standalone/python.exe")
debugpy.listen(<portnumber>)

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources