I thought I asked this before but can't find it back.
If we want during debugging that a certain method is skipped (when e.g. step is chosen) I thought in VS you should add:
[DebuggerStepThrough]
just above the method/function.
This works in C#.
However, in X# I get Error XS9002 Parser: unexpected CRLF, are you missing a token ?
I tried it with an extra empty line after it, with and without a ; but no luck.
What should it be?
Dick
[DebuggerStepThrough]
[DebuggerStepThrough]
Hi Dick,
You just need a ";" between the attribute and the method declaration, and no empty lines in between. Just as if it was a single statement.
You just need a ";" between the attribute and the method declaration, and no empty lines in between. Just as if it was a single statement.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
[DebuggerStepThrough]
Code: Select all
[DebuggerStepThrough];
Function DBG(cString as string) as void pascal
Which reference do you need to use this?
I assumed it is covered by Xsharp.RT but I still have this error
[DebuggerStepThrough]
Frank
System.Diagnostics
Robert
System.Diagnostics
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
[DebuggerStepThrough]
...that is, you need a USING System.Diagnostics statement. The dll it is contained in is the most standard library that is referenced automatically by all projects (mscorlib.dll), so no need to add any additional reference.
https://docs.microsoft.com/en-us/dotnet ... mework-4.8
https://docs.microsoft.com/en-us/dotnet ... mework-4.8
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
[DebuggerStepThrough]
Code: Select all
using System.Diagnostics
[DebuggerStepThrough];
Function etc
It works now
Thanks a lot!
Frank