From 6da8f4f1adbb1a898759c4bc0bc5ffdfdd9f89e3 Mon Sep 17 00:00:00 2001 From: Jonathan Heindl Date: Fri, 12 Jan 2024 18:57:46 +0100 Subject: [PATCH 1/2] Update actions.rst put info down --- scripting/actions.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripting/actions.rst b/scripting/actions.rst index 020f05c6a4..3132578d8b 100644 --- a/scripting/actions.rst +++ b/scripting/actions.rst @@ -104,3 +104,21 @@ 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 + +``launch.json``: +.. 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", + } + From 9ec513aed3209c41f3c8140b2af20424ef561cec Mon Sep 17 00:00:00 2001 From: Jonathan Heindl Date: Fri, 12 Jan 2024 19:11:15 +0100 Subject: [PATCH 2/2] Update actions.rst fixed fformatting --- scripting/actions.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripting/actions.rst b/scripting/actions.rst index 3132578d8b..5382df08f1 100644 --- a/scripting/actions.rst +++ b/scripting/actions.rst @@ -106,14 +106,18 @@ The ``extra_script.py`` file is located in the same directory as ) Debugging extra_scripts: ------------------- +------------------------ + + + #. create your extra script with `print(sys.argv)` as content #. then add a launch json like -``launch.json``: + .. code-block:: javascript - { + + { "name": "Python Debugger: Upload", "type": "debugpy", "request": "launch", @@ -122,3 +126,5 @@ Debugging extra_scripts: "console": "integratedTerminal", } + +