diff --git a/scripting/actions.rst b/scripting/actions.rst index 020f05c6a4..5382df08f1 100644 --- a/scripting/actions.rst +++ b/scripting/actions.rst @@ -104,3 +104,27 @@ The ``extra_script.py`` file is located in the same directory as "$BUILD_DIR/${PROGNAME}.elf", "$BUILD_DIR/${PROGNAME}.hex" ]), "Building $BUILD_DIR/${PROGNAME}.hex") ) + +Debugging extra_scripts: +------------------------ + + + + +#. create your extra script with `print(sys.argv)` as content +#. then add a launch json like + + +.. code-block:: javascript + + { + "name": "Python Debugger: Upload", + "type": "debugpy", + "request": "launch", + "program": ".....\\scons.py",// put first argument of argv here + "args": [ ], // and put the rest into this args array + "console": "integratedTerminal", + } + + +