1 Create a basic Web Service Codeunit
A new Codeunit was created with a method that returns a random color.
2 Publish the Codeunit as a Web Service in Business Central
After publishing, make sure you can access the SOAP URL.
3 In VS Code, add a new “attach” configuration in launch.json
4 Set the Breakpoint in VS Code and start a Debug Session with “Debug without publishing (Ctrl + Shift + F5)” and select the “Attach: BC180” configuration
5 Use SOAP UI (or Postman) to call the Method
6 The debugger will break on the Breakpoint
- The example above will also work with Job Queue if you change the “breakOnNext” property to “Background” in the attach configuration in launch.json.
- To attach the app must be firstly published without debugging, before you start the debugging session (A).