简体   繁体   中英

Debugging F# applications using Visual Studio

I need to use Visual Studio in order to debug an F# application. What do I need to do?

I know about the EntryPoint attribute but it is not simple to do that. First of all I build my application in Viual Studio, so I do not know how to tell him that a certain file must be the last in compilation order. Furthermore, even if I succeeded in compiling, how could I start Visual Studio debugger?

My main need is just using debug tools just like breakpoints and more in ordeer to follow what a certain function of mine works.

Thankyou

PS: VS2010 :)

ALT+UP/DOWN (in Solution Explorer) rearranges file compilation order (this can also be done through the context menu). Debugging in F# works the same as in C#. Click in the margins (or F9) to set a breakpoint. F5 to run/debug.

If you put the file containing the entry point at the bottom of the project explorer tree, it becomes the last in compilation order. You can use shortcut key Atl + Down/Up Arrow or simply drag and drop. Once it is done, set the breakpoints and you can start debugging.

I hope I do not missunderstand your question.

You can change the compilation order of your files with ALT+up or ALT+down. You do not need to place the EntryPoint attribute, when your files are in the right order. Put the file to start with down at the bottom of the file list.

The debugger is started in the menu: Debug->Start Debugging (or F5 on my machine).

Breakpoints are in the same menu: Debug->...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM