Skip to content
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

How to debug? #48

Open
EmkioA opened this issue Jun 1, 2017 · 2 comments
Open

How to debug? #48

EmkioA opened this issue Jun 1, 2017 · 2 comments

Comments

@EmkioA
Copy link

EmkioA commented Jun 1, 2017

as stated earlier, no break point possible.

alert() is not working too.

@EmkioA
Copy link
Author

EmkioA commented Jun 2, 2017

Why use JavaScript as language, we are into Visual Studio, why not use c# and/or vb?

@daiplusplus
Copy link

I've found I can do rudimentary print-style debugging via the VS Output window:

var vsWindowKindOutput = "{34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3}";

var outputWindow  = dte.Windows.Item( vsWindowKindOutput );
outputWindow.Activate();

var outputWindow2 = outputWindow.Object; // <-- Weird: https://learn.microsoft.com/en-us/dotnet/api/envdte.outputwindowpanes
var outputPane1   = outputWindow2.ActivePane;
var outputPane2   = outputWindow2.OutputWindowPanes.Item( 1 /* name */ );

outputPane1.Activate(); // <-- Is this necessary?
outputPane1.OutputString( new Date() );
outputPane1.OutputString( "\r\n" );

(This code currently re-uses the current Output pane as I'm having problems with OutputWindowPanes.Add( "MyMacro Output" ) not working reliably.

Screenshot proof:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants