From Visual Studio

Dynamics and Visual Studio error: “The breakpoint will not currently be hit.”

If you see the following error while adding a breakpoint to X++ code in Visual Studio:
The breakpoint will not currently be hit. No symbols have been loaded for this document.

And your breakpoint is empty with a small exclamation mark next to it:
Breakpoint disabled

Enable the parameter to allow Visual Studio to load symbols for items that are not in your current solution:

Tools> Options> Dynamics AX> Debugging
parameters

This will enable the breakpoints in the code:
breakpoint enabled

Once you start debugging your breakpoints in the breakpoints window will also turn from empty to red, and they will be hit when the code is executed:
Breakpoints

I hope this solves the error! If it does, or it doesn’t, let me know in the comments.

Useful commands for AX 7

Today marks my first day offical day as AX 7 (Dynamics 365 for Operations) developer. To celebrate I though I would post two commands that have come in useful so far:

Internet Information Services (IIS)

  • iisreset /stop
  • iisreset /start
  • iisreset /restart

To run the commands, press Windows key + R, type them in and press enter.

iisreset

These commands stop, starts or restarts your server. Think of it as the same commands you used to do in Services to stop and start the AOS.

Visual Studio

  • devenv /resetuserdata

This command can be run in the Visual Studio Command prompt:

vs-cmd

This command deletes the user preferences for Visual Studio.

So far we’ve tried it for every issue we’ve run into: Table browser not working, EDT editor not opening and so on and so forth. It has not solved any of our issues till now, but I thought I would put it out there. If it solves some inexplicable issue you have with Visual Studio and AX 7, please let me know in the comments!