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

Edits not reflected in debug mode #35

Open
LucasBullen opened this issue Mar 15, 2018 · 4 comments
Open

Edits not reflected in debug mode #35

LucasBullen opened this issue Mar 15, 2018 · 4 comments
Labels

Comments

@LucasBullen
Copy link

With the code:

fn main() {
	let mut a = "first";
	println!("Hello, world!");
	println!("The value of x is: {}", a);
}
  • Put a breakpoint on the println!("Hello, world!"); line
  • Debug the program
  • Change the value of a to second
  • Continue running the program

Expected

Prints The value of x is: second

Actual

Prints The value of x is: first

@LucasBullen
Copy link
Author

Reaching a road block with this issue. Able to update the variables within the variables view, and it does effect the debug and able to update the code and it updates the source in the Disassembly view, but it won't cause an update to the debugger. Any input on what I might be missing here?

@mickaelistria
Copy link
Contributor

It can be some specifics of the GDB integration requiring a flag for some level hot reload; or maybe it's that hot reload is not available at all in GDB's family? cc @akurtakov

@akurtakov
Copy link
Member

So I tried with a being an i32 and I can change the value in debugger and it works properly. So it works with primitives but not with other types.

@akurtakov
Copy link
Member

Yet another observation - I can no longer change the value of a string now. It probably has smth to do with prettyprinters applied by rust-gdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants