microsoft / vscode-serial-monitor

Serial Monitor that allows for reading and writing to serial ports. Official issue tracking repository for Microsoft's Serial Monitor VS Code extension.
MIT License
60 stars 8 forks source link

Serial monitor says: NA - No port selected #126

Closed lvanek240267 closed 1 year ago

lvanek240267 commented 1 year ago

Type: Bug

I have connected Raspberry PI Pico with Picoprobe loaded. I can debug programs on slave PI e.g. (PICO-EXAMPLES/usb/hello_usb.c), but can't select any COM port in Serial monitor. In Windows device manager I can see 'Picoprobe CMSIS-DAP v2 (Interface 0)' installed by Zadig.

Any seggestions pleasse ? Thanks Lumir

Extension version: 0.10.0 VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7820X CPU @ 3.60GHz (16 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.73GB (19.12GB free)| |Process Argv|--crash-reporter-id f5b88d7c-8aac-4c86-bfef-8b0b2ee8c95d| |Screen Reader|no| |VM|50%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263cf:30792227 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 vscccc:30803845 282f8724:30602487 89544117:30613380 showlangstatbar:30737416 a2ce3375:30757347 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxpt:30805730 pythonnoceb:30805159 dsvsc013:30795093 dsvsc014:30804076 diffeditorv1:30812748 ```
lvanek240267 commented 1 year ago

noportssel

lvanek240267 commented 1 year ago

Now I found that this issue is related to debugging. When I connect USB cable to Raspberry PI where code is running, Serial monitor works OK.

gcampbell-msft commented 1 year ago

@lvanek240267 Thanks for the clarification. I would expect that it's possible that the Raspberry PI is using the USB for debugging and/or flashing, in which case it's likely that the serial port can't be monitoring while debugging. Closing this issue as "by design", but please let me know if my understanding is incorrect and I can re-open the issue if needed.

lvanek240267 commented 1 year ago

Hi,

but I'm belived that in some older version it was possible. See: VC_Code3

gcampbell-msft commented 1 year ago

Hmmm that is interesting. Could you report what version it worked on for you and what version it didn't? Either way, I think this is likely an external bug dependent on the serialport library we use, but it'd be good to get as much info as we can.

Thanks!

lvanek240267 commented 1 year ago

This image I shot 13.06.2023. It must be before VS Code 1.81.1

gcampbell-msft commented 1 year ago

What version of the Serial Monitor extension?

lvanek240267 commented 1 year ago

It's v0.10.0. When I switch to Prerelease version, behavior is the same.

gcampbell-msft commented 1 year ago

What is the last Serial Monitor extension version where this was working?

lvanek240267 commented 1 year ago

Sorry, when it worked I didn't care.

lvanek240267 commented 1 year ago

Hi, now I connected both Picos to two different USB ports and it works. I have set: pico_enable_stdio_usb(my_blink 1) pico_enable_stdio_uart(my_blink 1) in CMakelist.txt

DebuggingPico

gcampbell-msft commented 1 year ago

It may also be a timing issue where debugging makes the connectivity flash, and if that occurs you can always press the manual refresh button. Since it seems like it's working for you now, I'll close this issue again.

However, like last time, if you hit more issues I'm happy to re-open.

lvanek240267 commented 1 year ago

I have some note: If You have problem with this solution -

  1. Start debugging, program will be loaded thru Picoprobe
  2. Disconnect cable from debugged Pico (blue in my case), and connect again
  3. Start monitoring in Terminal 20230829_111546