Thread overview |
---|
March 19, 2008 debug in program files | ||||
---|---|---|---|---|
| ||||
I notice a lot of the program files have a debug section or function Without writing a separate program is there a way to run the debug portion from the command line . ie dmd -switch somedfile ? |
March 19, 2008 Re: debug in program files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tower Ty | On Wed, 2008-03-19 at 18:30 -0400, Tower Ty wrote: > I notice a lot of the program files have a debug section or function Without writing a separate program is there a way to run the debug portion from the command line . ie dmd -switch somedfile ? dmd -debug somefile or you can use -debug=level or -debug=ident for debugs whitch have a level or an ident. see dmd --help -- Mike Wey |
March 19, 2008 Re: debug in program files | ||||
---|---|---|---|---|
| ||||
Posted in reply to Milke Wey | Milke Wey wrote:
>
>>I notice a lot of the program files have a debug section or function Without writing a separate program is there a way to run the debug portion from the command line . ie dmd -switch somedfile ?
>
>
> dmd -debug somefile
>
> or you can use -debug=level or -debug=ident for debugs whitch have a
> level or an ident. see dmd --help
>
That only includes the debug code. "debug" is used as a conditional compilation section. If a user want to call the code in the debug section, that will, by design, requirer some more code.
|
March 20, 2008 Re: debug in program files | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | "BCS" <BCS@pathlink.com> wrote in message news:frs5nj$8f$7@digitalmars.com... > Milke Wey wrote: >> >>>I notice a lot of the program files have a debug section or function Without writing a separate program is there a way to run the debug portion from the command line . ie dmd -switch somedfile ? >> >> >> dmd -debug somefile >> >> or you can use -debug=level or -debug=ident for debugs whitch have a level or an ident. see dmd --help >> > > That only includes the debug code. "debug" is used as a conditional compilation section. If a user want to call the code in the debug section, that will, by design, requirer some more code. A fairly unrelated switch/code-block which allows you to execute specific sections of code with a flag is the "unittest" block and associated -unittest flag to dmd. Not sure if this would be any more applicable. |
Copyright © 1999-2021 by the D Language Foundation