How to debug Excel Script

PoPe 50 Reputation points
2023-08-11T06:18:26.46+00:00

Hello,

is there a way how to debug Excel scripts (Office scripts using TypeScript, not VBA), using Code Editor?

Microsoft 365 and Office Development Office JavaScript API
Microsoft 365 and Office Excel For business Windows
{count} votes

Accepted answer
  1. Tanay Prasad 2,250 Reputation points
    2023-08-16T06:48:41.1933333+00:00

    Hi,

    You can output values and messages to the console by using console.log() statements in your code. It can assist you in understanding what is occurring in your script, despite not being as sophisticated as a full debugging environment.

    Or, To detect and address potential script errors, use try-catch blocks. This won't give you access to a debugging environment, but it can show you where an error is happening.

    Best Regards.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.