microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.36k stars 28.6k forks source link

calling `await window.showInformationMessage` exits the function #212931

Closed billgan1024 closed 3 months ago

billgan1024 commented 3 months ago

Type: Bug

call await vscode.window.showInformationMessage in a vscode extension

expected result: function proceeds normally actual result: function exits

VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i9-12900K (24 x 3187)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|63.75GB (48.73GB free)| |Process Argv|--crash-reporter-id 991d6f0b-3750-47e4-a4c6-19a6e47078f2| |Screen Reader|no| |VM|0%|
Extensions (23) Extension|Author (truncated)|Version ---|---|--- project-manager|ale|12.8.0 vscode-eslint|dba|2.4.4 gitlens|eam|15.0.3 copilot|Git|1.194.0 copilot-chat|Git|0.15.1 google-drive-vscode|Gus|1.3.9 output-colorizer|IBM|0.1.2 discord-vscode|icr|5.8.0 google-search|kam|0.0.1 vscode-autohotkey-plus-plus|mar|5.0.3 vscode-antlr4|mik|2.4.6 cpptools|ms-|1.20.5 hexeditor|ms-|1.10.0 powershell|ms-|2024.2.2 typst-lsp|nva|0.13.0 material-icon-theme|PKi|5.3.0 vscode-yaml|red|1.14.0 rust-analyzer|rus|0.3.1958 even-better-toml|tam|0.19.2 hlsltools|Tim|1.1.303 pdf|tom|1.2.2 utils|und|0.0.1 errorlens|use|3.17.0
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 tftest:31042121 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelc:31048052 dsvsc021:30996838 g316j359:31013175 pythoncenvpt:31049070 a69g1124:31046351 dvdeprecationcf:31040882 pythonprc:31047982 dwnewjupytercf:31046870 26j00206:31048877 ```
VSCodeTriageBot commented 3 months ago

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

jrieken commented 3 months ago

This issue lack

billgan1024 commented 3 months ago

Here is a demonstration of the issue: https://github.com/microsoft/vscode/assets/17630457/bb14e1f3-5c33-4ec0-9ea8-965348f0b415

jrieken commented 3 months ago

You are awaiting the function call, means means the function execution is paused until the promise resolved. You do that by selecting/dismissing the information message in the debuggee window