Currently I'm developing an small JavaScript add-in for the new web-based desktop version of Microsoft Office Outlook:
Microsoft Outlook version 1.2023.418.200 (Production).
Client version is 20230414002.05.
While I'm able to correctly write a basic add-in (with the help of Yeoman), I fail to debug my add-in or even get a console.log
output window.
Since I'm assuming that the new Outlook is based on some kind of hosted Edge WebView and/or Electron, I found no way to actually get the usual Developer Tools.
My assumption is based on the fact that in Process Explorer, the new Outlook is shown as "olk.exe" with several "MsEdgeWebView2.exe" sub-processes:
What I've tried
I've read these other SO articles:
- Outlook AddIn : How to show console.log with Outlook Desktop?
- Outlook Office Add-in (Desktop) does not have devtools
I also tried the suggested Microsoft Edge Dev Tools Preview from the Microsoft Store, but unfortunately Outlook does not appear in the list of possible apps to attach to.
I've also spent hours browsing through the Microsoft documentation with no result, too.
And, of course, I tried every Google search I could imagine. Still I found no meaningful results.
In addition, I found the MSDN article "Debug a task pane add-in using Microsoft Edge (Chromium-based) developer tools". I failed to follow this step:
Be sure the add-in's task pane has focus and press Ctrl+Shift+I.
This cannot be done in my scenario, since my add-in has no task pane (I simply try to set the subject of a new email message by calling setAsync
on the subject
property). In addition, pressing Ctrl+Shift+I has no effect at all, no matter which input field I do focus.
My question
How can I show a debug and/or output window to see the console.log()
statements that my JavaScript-based Microsoft Office Outlook add-in (for the web-based desktop version) prints?
Currently I'm developing an small JavaScript add-in for the new web-based desktop version of Microsoft Office Outlook:
Microsoft Outlook version 1.2023.418.200 (Production).
Client version is 20230414002.05.
While I'm able to correctly write a basic add-in (with the help of Yeoman), I fail to debug my add-in or even get a console.log
output window.
Since I'm assuming that the new Outlook is based on some kind of hosted Edge WebView and/or Electron, I found no way to actually get the usual Developer Tools.
My assumption is based on the fact that in Process Explorer, the new Outlook is shown as "olk.exe" with several "MsEdgeWebView2.exe" sub-processes:
What I've tried
I've read these other SO articles:
- Outlook AddIn : How to show console.log with Outlook Desktop?
- Outlook Office Add-in (Desktop) does not have devtools
I also tried the suggested Microsoft Edge Dev Tools Preview from the Microsoft Store, but unfortunately Outlook does not appear in the list of possible apps to attach to.
I've also spent hours browsing through the Microsoft documentation with no result, too.
And, of course, I tried every Google search I could imagine. Still I found no meaningful results.
In addition, I found the MSDN article "Debug a task pane add-in using Microsoft Edge (Chromium-based) developer tools". I failed to follow this step:
Be sure the add-in's task pane has focus and press Ctrl+Shift+I.
This cannot be done in my scenario, since my add-in has no task pane (I simply try to set the subject of a new email message by calling setAsync
on the subject
property). In addition, pressing Ctrl+Shift+I has no effect at all, no matter which input field I do focus.
My question
How can I show a debug and/or output window to see the console.log()
statements that my JavaScript-based Microsoft Office Outlook add-in (for the web-based desktop version) prints?
- 1 Hi @Uwe Keim, Are you using LaunchEvents to set the subject in your add-in? If so, you can debug LaunchEvent add-ins via this method: learn.microsoft./en-us/office/dev/add-ins/outlook/… and if that doesn't work, you can add runtime logging using this method: learn.microsoft./en-us/office/dev/add-ins/testing/… – user7823505 Commented Apr 27, 2023 at 22:07
- Hi @Uwe Keim, you can debug your add-in in the web browser. – Victor Ivanidze Commented May 8, 2023 at 8:44
-
This is an add-in for the local Outlook app, @VictorIvanidze. How could debugging it in the web browser be a realistic scenario? I would have to chance significant portions of my "manifest.xml", e.g. the
<DesktopFormFactor>
nodes. – Uwe Keim Commented May 8, 2023 at 10:14
2 Answers
Reset to default 8The previous answer doesn't work anymore, today in order to run the DevTools in the New Outlook you should run on the CMD
olk.exe --devtools
Source: Microsoft documentation
EDIT: Update, this no longer works, please see the answer provided by Pahima7 in https://stackoverflow./a/78219863/7312536
I figured it out:
- Make sure all Outlook windows are closed
- Navigate to
%localappdata%\Microsoft\Olk\
- Create a file named
config.json
- Open the file and enter the following:
{
"edgeDevTools": "enabled"
}
- Save the file, then open Outlook
- Press F12 or use any of the other normal shortcut keys to open the dev tools