How to debug a plugin - I have ran Example Plugin from both within the repository and in the download (in debug)everything runs in the Editor but the break point is not hit. The .pdb file and .dll are in the C:\Program Files\OpenTAP\Packages\SDK\Examples\bin\Debug\
As I understand it the Editor will run in above folder so should find the .pdb ?
Is there additional steps or file moving that needs doing ?
Where should we create our custom plugins ? in Packages or the opentap folder ?
Many regards Andy
Hi Ronghuaw,
No unfortunately - I’m not sure if Keysight are using everything in Linux , I’ve abandoned Opentap for now and written my own app as we only have a couple products and only me as test/production engineer so not at the enterprise level yet
Visual Studio 2019, everything works fine except i can’t debug when open Examples.sln in C:\Program Files\OpenTAP\Packages\SDK\Exaamples (follow the youtube training video). thanks.
Since the TargetFramework is netstandard2.0 in the Directory.Build.props file, Visual Studio thinks it should debug the process with the .net6/netcore debugger. This is not the case, because Editor.exe is a .net framework executable.
To fix this, change <TargetFramework>netstandard2.0</TargetFramework>
Thanks rolf, i can debug now, does that mean if you like to create the custom plugin and like to debug, only can use the .net framework instead of .net core?
@ronghuaw, that’s right. If you’re using Visual Studio to debug your custom plugin, you’ll need to target the .NET Framework in order for debugging to work. However, even if you’re using the .NET Framework for debugging purposes, your project will still work on .NET Core. So you can use either .NET Framework or .NET Core for your project, but you may need to use the .NET Framework for debugging purposes if you’re using Visual Studio.
Examples debugging seemed to work fine in VS2019 but caused problems in VS2022. All projects needed switching to .NET Framework. Probably because of the update to .net6 as @rolf_madsen points out. Is there a way to switch debuggers instead of changing TargetFrameworks?
There is a workaround. You can have an extra project called e.g MyProject.Debug. And that can target .net framework,while everything else targets .netstandard. So when you click F5 and Myproject.Debug is selected it starts the right debugger and everything works as expected.