Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Console log in Javascript Office Addin

Tags:

I have a question about "console.log" in Javascript Web Office Addins. Currently I am working on Javascript Word Addin and can't troubleshoot it, because I don't understand where the "console.log" output is sent. On Microsoft site there are a lot of examples, that contain contain "console.log", but they never specify how to check these outputs.

So, the question is how can I see this "console.log" output. I am not using Visual Studio.

BR, Alexey

like image 769
Alexey Zelenkin Avatar asked May 11 '16 14:05

Alexey Zelenkin


People also ask

Can we write console log in JavaScript?

log() is a function in JavaScript which is used to print any kind of variables defined before in it or to just print any message that needs to be displayed to the user. Syntax: console. log(A);

How do I open console log in JavaScript?

The JavaScript console log function is mainly used for code debugging as it makes the JavaScript print the output to the console. To open the browser console, right-click on the page and select Inspect, and then click Console.

How do you console in JavaScript?

In JavaScript, the console is an object which provides access to the browser debugging console. We can open a console in web browser by using: Ctrl + Shift + I for windows and Command + Option + K for Mac. The console object provides us with several different methods, like : log()

How do I open the console in Outlook?

open your add-in on outlook. go to and open one of: 32-Bit – C:\Windows\System32\F12\IEChooser.exe 64-Bit – C:\Windows\SysWOW64\F12\IEChooser.exe and there is your debugger.


1 Answers

When you say you're not using Visual Studio, do you mean that you're not using the Visual Studio template? Or that you physically don't have Visual Studio on the machine (if so, might I recommend you install it -- even just the free/community edition)?

Once you have that:

  • Close all instances of Internet Explorer
  • Go to Visual Studio -> Debug -> Attach to process
  • Be sure to select "Attach to": "Script code"
  • Select all the iexplore.exe instances
  • Click "Attach"

You should now get a full debugging experience, complete with console output ("JavaScript console" window; use the Quick Launch (ctrl-Q) to launch it if it doesn't display be default), DOM Explorer (again, use Quick Launch if you don't see it), and more.

enter image description here

~ Michael Zlatkovsky, developer on Office Extensibility team, MSFT

like image 141
Michael Zlatkovsky - Microsoft Avatar answered Sep 29 '22 07:09

Michael Zlatkovsky - Microsoft