Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Debugging version of BeforeScript of template #96

Open
the-redback opened this issue May 15, 2020 · 1 comment · May be fixed by #99
Open

Feature Request: Debugging version of BeforeScript of template #96

the-redback opened this issue May 15, 2020 · 1 comment · May be fixed by #99

Comments

@the-redback
Copy link

the-redback commented May 15, 2020

Hello,

Thanks for this great tool.

I use debugging macros with ifdef like following:

#ifdef  redback
#define bug printf("line=%d\n",__LINE__);
#define debug(args...) {cout<<":: "; dbg,args; cout<<endl;}
struct  debugger {template<typename T>debugger& operator , (const T& v) {cout << v << " "; return *this;}} dbg;
#else
#define bug
#define debug(args...)
#endif  //debugging macros

In this case -Dredback flag is provided with compilation command. Other people uses -DONLINE_JUDGE

Now, in my scenario, the following two command will be very useful,

$ cf test
$ cf test -d

-D flag is provided for debugging compilation in 2nd options.

To achieve this, one extra field debugging_before_script can be added to the templates.

{
  "template": [
    {
      "alias": "cpp",
      "lang": "54",
      "path": "...",
      "suffix": [
        "cpp"
      ],
      "before_script": "g++ $%full%$ -o $%file%$.o -std=c++17",
      "debugging_before_script": "g++ $%full%$ -o $%file%$.o -std=c++17 -Dredback",
      "script": "./$%file%$.o",
      "after_script": ""
    }
  ],
 }
}
@the-redback
Copy link
Author

If this sounds good, I can start working on the source code.

@the-redback the-redback linked a pull request May 15, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant