Giter Club home page Giter Club logo

Comments (25)

neko-para avatar neko-para commented on May 10, 2024 1

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.

neko-para avatar neko-para commented on May 10, 2024 1

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.

caretaker-claire avatar caretaker-claire commented on May 10, 2024

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.

coder3101 avatar coder3101 commented on May 10, 2024

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.

coder3101 avatar coder3101 commented on May 10, 2024

Scintialla has margins that allow us to put breakpoints. This issue will get some attention once Scintilla based editor is released.

from cpeditor.

ouuan avatar ouuan commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

I'd rather like the solution I mentioned above: let the user use external frontend for GDB in one click.

from cpeditor.

ouuan avatar ouuan commented on May 10, 2024

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.

neko-para avatar neko-para commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

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.

  1. What is "pure competitors"?
  2. Why can't somebody use the terminal but can use GUI?

from cpeditor.

ouuan avatar ouuan commented on May 10, 2024

Does "cannot use terminals" mean "don't know how to use terminals"?

from cpeditor.

neko-para avatar neko-para commented on May 10, 2024

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.

  1. What is "pure competitors"?
  2. 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.

neko-para avatar neko-para commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

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.

neko-para avatar neko-para commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

However, it will be best if you can help us write a pretty GUI with the basic functions.

from cpeditor.

neko-para avatar neko-para commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

I also don't use gdbgui much, I usually use cerr to debug.

from cpeditor.

neko-para avatar neko-para commented on May 10, 2024

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.

neko-para avatar neko-para commented on May 10, 2024

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.

neko-para avatar neko-para commented on May 10, 2024

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.

ouuan avatar ouuan commented on May 10, 2024

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.

neko-para avatar neko-para commented on May 10, 2024

Currently #340 is quite poor. As no left margin and line highlight, it's very hard to use it.

from cpeditor.

neko-para avatar neko-para commented on May 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.