Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use an attach debugging session to test and troubleshoot install and upgrade codeunits when an extension is installed or upgraded.
Attach and debug
- In Visual Studio Code, configure
launch.jsonwithrequestset toattach. Make sure thatuseSystemSessionForDeploymentisfalse, which is the default. When it'strue, install and upgrade codeunits run in a system session and can't be debugged. - Add breakpoints to the install or upgrade code that you want to debug.
- Press F5 to start the attach debugging session.
- After the debugger attaches, press Ctrl+F5 to run Publish extension without building.
If you don't increment the app version, the install codeunits run. If you increment the app version or set forceUpgrade to true in launch.json, the upgrade codeunits run.
Learn more about attach configurations in Attach and debug next. Learn more about setting breakpoints in Debugging in AL.