Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Debugging teensy and serial terminal using VScode

  1. #1
    Junior Member
    Join Date
    Mar 2021
    Posts
    19

    Debugging teensy and serial terminal using VScode

    Do I have to install any package or app to see the debugger window and see outputs of Serial.print()?

  2. #2
    Junior Member
    Join Date
    Mar 2021
    Posts
    19
    I activated the "Debug support" window at the visual teensy and generated a new project,
    But when activating "Start Debugging" using F5, it advised that is needed the Cortex-Debug
    I found it here: https://marketplace.visualstudio.com...5.cortex-debug and installed it
    Then made again Start Debug but appeared a new error: "Failed to launch undefined GDB server and advised to add it to the launch.json

  3. #3
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,447
    You would need a debug probe like a JLink and the corresponding GDB server to make this work. Plus you need to modify the hardware of your Teensy to be able to connect this probe. You find some information and a link describing the required hardware changes here: https://github.com/luni64/VisualTeen...s/tag/v0.9.7.0.

    It worked with both, PIO and VisualTeensy. I.e., you can step through code, look at the processor/peripheral registers, set breakpoints etc. However, I had the impression that I spent more time fighting against glitches in the debugger than doing actual debugging. At the end, I decided that, for me, it is not worth the hassle. Here a quick video showing how it behaves.




    There is also a forum post showing how to use a flex PCB to offload the T4 bootloader chip on a flex PCB to be able to connect a debug probe. Looked professional but I don't know if it worked at the end of the day.

  4. #4
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    1,447
    ...and see outputs of Serial.print()?
    I recommend to install the TyTools to upload & monitor. You can integrate it to VisualTeensy in the settings tab.

    Click image for larger version. 

Name:	Screenshot 2021-04-14 141017.jpg 
Views:	16 
Size:	72.0 KB 
ID:	24445

  5. #5
    Junior Member
    Join Date
    Mar 2021
    Posts
    19
    Thank you luni, the terminal works!, I have to click on Tycommander Serial button and also at the Serial label and appeared

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •