As I understand the JavaScript Console was removed in VS 2019.
How can one still use it for Web Add-ins? Is there a work-around?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@AlexJerabek The poster is correct. There's no JS console in Visual Studio 2019, so we should not have the lines calling console.log in the VS tab of this quickstart. Probably, the least bad option here is to create a textbox or some other UI on the page and do the logging as text for the box.
Thanks @Rick-Kirkham. I've created an internal work item to track reworking this quick start.
@peteshub, does @Rick-Kirkham's suggestion of a textbox unblock you for now? Alternatively, it might be easier to use the Yeoman generator/VS Code version of the quick start. Please let me know which path you choose.
Thanks @Rick-Kirkham and @AlexJerabek for the quick reply!
okay, I could live with a text box for a little while ;)
I actually tried to do it with Yeoman and VS Code, which I would prefer now, but since I don't have Office Web, I am afraid I would have to debug the Add-In on my "local" Excel. Do you have a quick explanation where/how I can see the console.log there? It does not seem to go into the Debug Console (I am btw not coding in JS a lot, so, forgive my ignorance).
I think the best way forward would be to have the console build into the Add-In in Excel (as with a web-browser).
@peteshub Have you seen our debugging docs, such as https://docs.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10 ?
Thanks @Rick-Kirkham ! I got what I want now with F12 Developer Tools. Thought it was somehow built into VS. But that's okay, it also resolves my first question then actually and I believe you only need to update the docs to include a hint hint to take a look at F12 or Edge DevTools. In general it's great to have JS now in Excel and I am looking forward to experimenting with it!
@AlexJerabek, @peteshub has a good idea. Instead of changing the code, maybe add a note to that step pointing out that people using VS 19 can get a console with the standalone F12 tools.
@peteshub The links to the debugging tools are now in the quickstarts. Thanks for reporting this issue.
If you have any other concerns or questions, please respond to this thread or raise a new issue.
Most helpful comment
@peteshub Have you seen our debugging docs, such as https://docs.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10 ?