Debugging
AlexHedley opened this issue · 2 comments
AlexHedley commented
What's the best way to debug the plugin?
Is it enough to add:
public static void Main(string[] args)
{
#if DEBUG
System.Diagnostics.Debugger.Launch();
#endif
// code
}
p.s. I'll add it to Docs
AlexHedley commented
https://twitter.com/JamesMontemagno/status/1312097488627732481
@csharpfritz is it possible to debug the Stream Deck Plugins with your toolkit? I am just using dotnet run and it installs fine, but not sure how to debug things.
@jamesmontemagno Yes, there is a hook in the startup of the plugin that will trigger the debugger if you pass a "-break" command-line argument:
Also:
https://github.com/FritzAndFriends/StreamDeckToolkit/blob/dev/src/SamplePlugin/SamplePlugin.cmd
cd %appdata%\Elgato\StreamDeck\Plugins\com.csharpfritz.samplePlugin.sdPlugin SamplePlugin.exe -break %*
jamesmontemagno commented
i could never figure it out. i need a video