Giter VIP home page Giter VIP logo

fusion360_python_debug_addin

This addin starts a HTTP server on localhost:8181 which can launch and debug (using PyDev.Debugger) python scripts inside Fusion 360. It currently only supports Mac OS but if someone compiles pydevd for Windows, it should be easy to add support for that too.

It is primarily intended for use with PyCharm and other Jetbrains IDEs.

After installing the addin, you need to tick the "Run on Startup" in the "Scripts and Add-Ins" window in Fusion 360.

To trigger a script to be run, you can simply make a HTTP POST request to the server with the correctly filled out JSON arguments. Here is an example using curl:

curl --data '{"script": "/Users/jeremy/fusion_test_script/script.py", "detach": false, "debug_port":7681}' http://localhost:8181

These fields are as follows:

  • script - The absolute path to the script which will be run
  • detach - if true, force the debugger to detach after the script has run
  • debug_port - the port of your python debug server

Use with PyCharm

To use this with PyCharm, create a new Run/Debug Configuration and choose the type "Remote Python Debug". Start your debug server and you should see the following in the Debug console in PyCharm:

Starting debug server at port 7681
Use the following code to connect to the debugger:
import pydevd_pycharm
pydevd_pycharm.settrace('localhost', port=7681, stdoutToServer=True, stderrToServer=True)
Waiting for process connection...

Set a breakpoint in your script. Then, simply use the port listed in the Run/Debug Configuration window (also shown the Debug console output) in your HTTP request and PyCharm should break at the breakpoint in your script.

Jeremy Herbert's Projects

amaranth icon amaranth

A modern hardware definition language and toolchain based on Python

ansible icon ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.

apicula icon apicula

Project Apicula 🐝: bitstream documentation for Gowin FPGAs

barbutils icon barbutils

python script to generate/load BARB waveform files

bluepy icon bluepy

Python interface to Bluetooth LE on Linux

cbor icon cbor

A CBOR implementation for Dart

cedric icon cedric

A regex-based website testing tool

ch32v003fun icon ch32v003fun

An open source software development stack for the CH32V003, a 10¢ 48 MHz RISC-V Microcontroller

cocotb icon cocotb

Coroutine Co-simulation Test Bench

crc_python_amaranth icon crc_python_amaranth

A python and Amaranth (ie HDL) implementation of the CRC algorithm which supports arbitrary polynomials

esp-idf icon esp-idf

Espressif IoT Development Framework. Official development framework for ESP32.

etl icon etl

Embedded Template Library

gb-snake icon gb-snake

Snake written in gameboy (DMG-style) z80 assembly

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.