Break only when Debugging
-
- Posts: 280
- Joined: Sat Dec 12, 2015 2:22 pm
- Location: Germany
Break only when Debugging
Hello,
I try some new code with X# without Vulcan DLL and have a Question.
I use XIDE 1.15 and X# Compiler version 2.0.0.6
this Code:
LOCAL c AS STRING
LOCAL d AS DATE
c:=DToC(today())
d:=CToD(" . . ")
d:=CToD(NULL_STRING)
d:=Null_date
I get no error when run start the Application. When Debug i get:
at this line:
d:=CToD(" . . ") --->>> System.FormatException Die Eingabezeichenfolge hat das falsche Format.
My Question is, why not show the Error when Run the App? Perhaps Settings in Xide?
Why CToD(" . . ") work with VO and not X#
Regards Frank
I try some new code with X# without Vulcan DLL and have a Question.
I use XIDE 1.15 and X# Compiler version 2.0.0.6
this Code:
LOCAL c AS STRING
LOCAL d AS DATE
c:=DToC(today())
d:=CToD(" . . ")
d:=CToD(NULL_STRING)
d:=Null_date
I get no error when run start the Application. When Debug i get:
at this line:
d:=CToD(" . . ") --->>> System.FormatException Die Eingabezeichenfolge hat das falsche Format.
My Question is, why not show the Error when Run the App? Perhaps Settings in Xide?
Why CToD(" . . ") work with VO and not X#
Regards Frank
Break only when Debugging
Frank,
copied your lines, then
FUNCTION Start( ) AS VOID
LOCAL uXSharpUsual AS USUAL
uXSharpUsual := "Hello X# runtime!"
System.Console.WriteLine(AsString(uXSharpUsual))
LOCAL c AS STRING
LOCAL d AS DATE
c:=DToC(Today())
d:=CToD(" . . ")
d:=CToD(NULL_STRING)
? d:=Null_date
RETURN
Runs, as for you.
When debugging i have to switch to x86mode, then i can walk through all lines without a hitch.
Karl @W8.1/64, Xide 1.15 & X#2.0.0.6
copied your lines, then
FUNCTION Start( ) AS VOID
LOCAL uXSharpUsual AS USUAL
uXSharpUsual := "Hello X# runtime!"
System.Console.WriteLine(AsString(uXSharpUsual))
LOCAL c AS STRING
LOCAL d AS DATE
c:=DToC(Today())
d:=CToD(" . . ")
d:=CToD(NULL_STRING)
? d:=Null_date
RETURN
Runs, as for you.
When debugging i have to switch to x86mode, then i can walk through all lines without a hitch.
Karl @W8.1/64, Xide 1.15 & X#2.0.0.6
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 280
- Joined: Sat Dec 12, 2015 2:22 pm
- Location: Germany
Break only when Debugging
Hi Karl,
i have all compile with X86.
CToD(" . . ") is only a sample that i found.
There is other Code that run without Error, but when debug the error is shown. That is my Problem.
Frank
i have all compile with X86.
CToD(" . . ") is only a sample that i found.
There is other Code that run without Error, but when debug the error is shown. That is my Problem.
Frank
Break only when Debugging
Frank,
Did you enable the option to break on "any exception". I can imagine that there is an exception inside the runtime (because we have not handled the empty date properly) but the result of the CTOD should still be a NULL_DATE. There is a TRY CATCH in the runtime that guarantees that the empty date is returned.
That would also explain why the code works "as expected" for Karl.
Robert
Did you enable the option to break on "any exception". I can imagine that there is an exception inside the runtime (because we have not handled the empty date properly) but the result of the CTOD should still be a NULL_DATE. There is a TRY CATCH in the runtime that guarantees that the empty date is returned.
That would also explain why the code works "as expected" for Karl.
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Break only when Debugging
Frank,
i wrote i CAN DEBUG through all of the shown code. Make an X#runtime new app, copy my code in, set a breakpoint in the "today"line and Shift F5. Works or no?
There's no chance to verify problems, if there are no concise descriptions of what you are doing exactly...
Karl
i wrote i CAN DEBUG through all of the shown code. Make an X#runtime new app, copy my code in, set a breakpoint in the "today"line and Shift F5. Works or no?
There's no chance to verify problems, if there are no concise descriptions of what you are doing exactly...
Karl
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Break only when Debugging
Hi Frank,
Most probably it's what Robert said, it is a harmless exception that happens inside the rutnime code and is being properly handled by our code. Please check the caption of the dialog that is shown when the exception is intercepted, it says "<exception name> was handled" (not "unhandled"), right?
You can chose to not break on handled exceptions by using form the menu Debug/Unhandled Exceptions->Break Never. And yes, after so many years, I just now realized he caption of this menu item is incorrect
Chris
Most probably it's what Robert said, it is a harmless exception that happens inside the rutnime code and is being properly handled by our code. Please check the caption of the dialog that is shown when the exception is intercepted, it says "<exception name> was handled" (not "unhandled"), right?
You can chose to not break on handled exceptions by using form the menu Debug/Unhandled Exceptions->Break Never. And yes, after so many years, I just now realized he caption of this menu item is incorrect
Chris
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Break only when Debugging
Chris,
FTR, after setting "Break always" i see Frank's exeption dlg, too.
FTR, after setting "Break always" i see Frank's exeption dlg, too.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
-
- Posts: 280
- Joined: Sat Dec 12, 2015 2:22 pm
- Location: Germany
Break only when Debugging
Hi Chris,
ok i will look for the <exception name> the next time, and will play with the "Debugger Options"
Karl,
i can debug through all the shown code, too. When i have a better Sample where i have noticed this, i will make a sample.
Frank
ok i will look for the <exception name> the next time, and will play with the "Debugger Options"
Karl,
i can debug through all the shown code, too. When i have a better Sample where i have noticed this, i will make a sample.
Frank
-
- Posts: 280
- Joined: Sat Dec 12, 2015 2:22 pm
- Location: Germany
Break only when Debugging
Hello,
Maybe a better example what I mean:
[STAThreadAttribute];
FUNCTION Start( asCmdLine AS STRING[] ) AS INT
LOCAL nExitCode AS INT
LOCAL oMainWindow AS StandardSDIWindow
LOCAL oApp AS App
LOCAL aD AS ARRAY
RDDSetDefault( "DBFCDX" )
nExitCode := 0
oApp := App{}
oMainWindow := StandardSDIWindow{oApp}
oMainWindow:Show(SHOWCENTERED)
AAdd(aD,"Test")
oApp:Exec()
RETURN nExitCode
///////////
XIde XSharp/Dialect VO/X86
this code does not run, naturally because array(AD) is not initialized.
But when 'Run' i get no Error Message.
When Debug i get the right Error Message "System.NullReferenceException"
So i can not see and find any Error
Frank
Maybe a better example what I mean:
[STAThreadAttribute];
FUNCTION Start( asCmdLine AS STRING[] ) AS INT
LOCAL nExitCode AS INT
LOCAL oMainWindow AS StandardSDIWindow
LOCAL oApp AS App
LOCAL aD AS ARRAY
RDDSetDefault( "DBFCDX" )
nExitCode := 0
oApp := App{}
oMainWindow := StandardSDIWindow{oApp}
oMainWindow:Show(SHOWCENTERED)
AAdd(aD,"Test")
oApp:Exec()
RETURN nExitCode
///////////
XIde XSharp/Dialect VO/X86
this code does not run, naturally because array(AD) is not initialized.
But when 'Run' i get no Error Message.
When Debug i get the right Error Message "System.NullReferenceException"
So i can not see and find any Error
Frank
- Attachments
-
[The extension viaef has been deactivated and can no longer be displayed.]
-
- Posts: 280
- Joined: Sat Dec 12, 2015 2:22 pm
- Location: Germany
Break only when Debugging
Hi,
other Sample.
Simple VO App that will open a Datawindow with ArrayServer work in VO. Transport to X# and not work. Call SELF:Use(oServer) (over FileOpen Method in Sample)
Can someone confirm this?
Frank
other Sample.
Simple VO App that will open a Datawindow with ArrayServer work in VO. Transport to X# and not work. Call SELF:Use(oServer) (over FileOpen Method in Sample)
Can someone confirm this?
Frank
- Attachments
-
[The extension viaef has been deactivated and can no longer be displayed.]