Detecting if a program was run by Visual Studio, as opposed to run from Windows Explorer

后端 未结 6 1378
萌比男神i
萌比男神i 2020-12-14 15:25

Is there a way to detect if your program was loaded through Visual Studio vs. whether it was started as a standalone executable?

Our software has a bug reporting fea

6条回答
  •  伪装坚强ぢ
    2020-12-14 16:09

    I don't do .net development, but in java I have done this by passing a flag into the startup options of the application. So you could pass a debug flag into the app from the IDE, and then check for that, when the app is run as an executable the flag would not be present. I would be surprised if .net didn't have something similar.

提交回复
热议问题