Comments (25)
gdb provide a machine interface for program to use it. It is no hard to implement a simple ui for gdb with the support to Start, Stop, Step, StepIn, StepOut, Print, Watch, as these features are included in gdb, and what we need is a wrapper.
from cpeditor.
I used to write a editor for c++(qdevcpp) which is similar to devcpp(however, it hasn't been update for months and i don't want to continue it), but i do think about how to implement the debug funtion and have done some experience. I'll do it if i have enough time
from cpeditor.
Hi ouuan
Thanks for Opening a new Issue here. I will also thank you for strictly following the Issue Templates.
I will add an appropriate tag to your Issue.
Have Patience, One of our Cool Contributors will help you soon.
from cpeditor.
Breakpoints supports are required from Editor for this feature to be incorporated in Editor. You can however add sanitizers to your compile commands and get more information about Crashes directly in Message box.
Set g++ -Wall -fsanitize=memory -g
to enable memory sanitizer and information about line where error occurred. You can also use address and undefined sanitizers as well.
from cpeditor.
Scintialla has margins that allow us to put breakpoints. This issue will get some attention once Scintilla based editor is released.
from cpeditor.
Instead of providing GUI support for GDB, we can let users set the debug command, and provide debug actions.
Users can set:
- Debug command:
gdbgui ${binary}
- Debug command with input:
gdbgui ${binary} < ${input}
- Compile command when debugging:
g++ -g
Users can do:
- Debug without input.
- Debug on a test case.
from cpeditor.
I'd rather like the solution I mentioned above: let the user use external frontend for GDB in one click.
from cpeditor.
It is no hard to implement a simple ui for gdb
what we need is a wrapper
That sounds easy, can you implement it?
from cpeditor.
For some pure competitors(according to my experience), they cannot use terminals or any tools based on it. The gdbui or gdb -ui
may be helpful, but i think it is a quite important feature.
from cpeditor.
For some pure competitors(according to my experience), they cannot use terminals or any tools based on it. The gdbui or
gdb -ui
may be helpful, but i think it is a quite important feature.
- What is "pure competitors"?
- Why can't somebody use the terminal but can use GUI?
from cpeditor.
Does "cannot use terminals" mean "don't know how to use terminals"?
from cpeditor.
For some pure competitors(according to my experience), they cannot use terminals or any tools based on it. The gdbui or
gdb -ui
may be helpful, but i think it is a quite important feature.
- What is "pure competitors"?
- Why can't somebody use the terminal but can use GUI?
Such "pure competitors" mean who learn only algorithm and no more. They cannot deal with the unusual problems(like strange compile error) and knows nothing about compile, link. They can do well on windows with the help of devc++, but when switch to linux they are always trapped. (actually they know how to search for information after learning more, but they are quite helpless at first)
They know how to use GUI, as they know the meaning of stepin, stepout and so on, but they are not well on dealing terminal program.
from cpeditor.
They do know more after learning, but at first some of they know nothing about computers(not only my senior high classmates, but also university classmates).
from cpeditor.
In fact, you only need to answer "Does 'cannot use terminals' mean 'don't know how to use terminals'?", I know there are people not good at terminals, but "cannot use terminal" doesn't sound like "don't know how to use"/"not familiar with".
If you can help us write a pretty GUI, that's good. But I think external tools like gdbgui is also a good choice, that will make things easier for the maintainers of CP Editor, and the user can have more choices.
from cpeditor.
Yes, what i mean it that they don't know how to use it.
ps. I'm not good at English, so some expressions may be strange. And I just know about this project from your passage on Zhihu about half an hour ago, so I come here and express my option.
from cpeditor.
Yes, what i mean it that they don't know how to use it.
ps. I'm not good at English, so some expressions may be strange. And I just know about this project from your passage on Zhihu about half an hour ago, so I come here and express my option.
You can use Chinese for the expressions which you are not sure. Possibly in brackets.
Do you mean they don't know how to use gdbgui? My plan is to make it able to launch external tools in CP Editor with a button/a shortcut. They may need to install external tools and set the command for launching external tools, but that is not hard, right?
from cpeditor.
However, it will be best if you can help us write a pretty GUI with the basic functions.
from cpeditor.
Actully i just know about gdbgui and it seems quite good(i have away from OI about two year and doesn't join ACM)
the ui I know before is the internal ui of gdb, aka gdb -ui
from cpeditor.
I also don't use gdbgui much, I usually use cerr
to debug.
from cpeditor.
Yes. but gdb is useful when a crash appears or debug with the data structure(use cerr to print will create a bunch of output if you want to know what happen)
from cpeditor.
I've already write a library which provides an interface to control gdb easily. I'd like to popup a modeless dialog which contains the debug control buttons and infomations, but I'm not sure if my window style could be similar to the style of cpeditor.
from cpeditor.
In some reasons it's not convenient for me to debug it on windows, and i have no idea if different version of gdb would provide the output in different syntax. It still needs test.
from cpeditor.
In fact, "reveal the executable file in the file manager" can be a workaround for many things. Now it's not very easy to find the executable file, especially when it's in the temporary directory. If users can easily find the executable file, they can do anything they like including running gdb. However, a GUI like #340 could be better if it works as expected.
from cpeditor.
Currently #340 is quite poor. As no left margin and line highlight, it's very hard to use it.
from cpeditor.
It seems that we can upgrade the LineNumberArea to support marks on the left margins, but I still don't know if there's a way to set some lines' background(current I use the cursor to show where the program is)
from cpeditor.
Related Issues (20)
- Failed to start running. Please compile first HOT 2
- Keybinding HOT 3
- Commented curly braces will be matched. HOT 1
- Take Input from file HOT 3
- 关于CP Editor内置特殊评测器的 bug HOT 1
- Filename when saving needs to match the full problem name HOT 1
- Add a default snippet HOT 4
- Add the option whether enable ctrl+roller to change editor font size HOT 4
- Please improve the appearance. It looks a little bit old. HOT 5
- Failed to start compilation:
- Kotlin HOT 1
- Add word count in find
- Python Auto Identation HOT 1
- bug HOT 1
- bracket auto completion doesn't work
- [Request] Support for VIM key bindings and for use of ALT to move line HOT 1
- Why not use KDE dependencies ? HOT 7
- Applying ubuntu 23.04 theme for CPeditor HOT 6
- CP editor stress testing HOT 1
- Opacity settings fail to work on startup HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpeditor.