-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Windows.Forms Dialogs Don't Open In Debugger #410
Comments
Hmm, haven't seen this before. I'll take a look! |
A little more info... I changed the code to this (using Add-Type instead of [System.Reflection...]) and debugged through it... it won't progress past the ".ShowDialog()" and never actually shows the dialog.
I do know that some of the windows forms stuff works, because I can use the below code to pop up a message balloon:
|
Unfortunately this setting will not make a difference, it's more of an issue with the code in our debug adapter. I still haven't got a chance to look at this but I will as soon as I ship 0.9.0. Sorry for the delay! |
Hi, is there any plan to fix this? Working on a project that uses this a lot, and it is a pain switching over to ISE to debug... |
I ran into this myself on a longtime running script that prompts for user/password: On ISE or commandline this creates a windows box that prompts. With the current terminal, it prompts in plain text. |
I think @sunmorgus has a reasonable idea. You can work-around this by launching your script in an external console with a |
I am in the process of moving over from ISE to VS Code (to leverage git), only to come across this problem. @rkeithhill Do you have a step-by-step for me? |
I can't repro the original issue. The OpenFile dialog opens for me and returns the selected file. If you have a repro post it here otherwise, I'm going to close this issue. |
Below is the code I'm working with (mostly not my own), which works great in PowerShell_ISE, as well as a regular PS prompt. I just found that if debugging with the option to "Launch current file in temporary console" it works too, however, when using the default "Launch current file" it executes in the integrated console and it just hangs indefinitely. Using the temporary console doesn't work for debugging blocks or lines of code of course. Is there a logfile for VS Code? I'm running the latest version 1.24.0 on Windows 10 1803.
|
@SuHwak you should be able to find the log files by following these instructions. The other way to do it is to go into VSCode and use Ctrl+Shift+P to bring up the VSCode command palette. In there, if you type "logs" you should get presented with an option like "PowerShell: Open PowerShell Extension Logs Folder". That will open the folder up for you in VSCode. |
Thank you @rjmholt, however, the logs don't show anything because the console just hangs (probably waiting for the result), and I have to force close the terminal. Any other suggestions? |
@SuHwak the logs should exist if the integrated console started — are you saying there are no logs at all, or that they just drop off when you run the hanging code and there's no further info? |
@SuHwak IIRC there is a bug in Electron where dialogs were showing up behind VSCode. Can you double check that the dialog you're looking for isn't behind VSCode. |
@rjmholt @tylerl0706 It was indeed hiding stealthily behind VS Code window all that time. It didn't create a taskbar item either or else I would have noticed earlier! Thank you, I can now revert back (thanks to Git) :) |
Here's the issue on VSCode. You may want to reply in that issue that this is the case. Im going to close this in favor of that since there's nothing we can do. If you think we do have a problem here, feel free to reach out! |
Please fill in these details so that we can help you!
System Details
$PSVersionTable
:Issue Description
Using the below script in the debugger, the dialog window does not appear, and the debugger crashes.
Attached Logs
vscode-powershell - Copy.txt
EditorServices - Copy.txt
The text was updated successfully, but these errors were encountered: