intellij-rust icon indicating copy to clipboard operation
intellij-rust copied to clipboard

Scroll to end doesn't work after error

Open paul-hansen opened this issue 4 years ago • 4 comments

Environment

  • IntelliJ Rust plugin version: 0.2.121.3059-201-stable
  • Rust toolchain version: stable-x86_64-pc-windows-msvc (default) rustc 1.43.0 (4fb7144ed 2020-04-20)
  • IDE name and version: CLion 2020.1.1 Build #CL-201.7223.86, built on April 29, 2020
  • Operating system: Windows 10 Version 1909 OS Build 18363.815

Problem description

The console stops scrolling when an error happens which is fine (would be nice to be able to turn off though) but after the error happens you cannot re-enable the scroll. This is a real pain when using cargo watch to automatically reload your changes (very common for web development). Defeats most of the purpose of using cargo watch as I have to manually reload to be able to see the new messages come in.

Steps to reproduce

  1. Install cargo watch cargo install cargo-watch
  2. run a project using watch -x "run" as your run configuration command
  3. Make a change that breaks your program and save the change. Cargo watch will re-run it automatically.
  4. Fix the change so it builds successfully again. Cargo watch will reload again.
  5. Observe that the "Scroll to end" button no longer sticks. clion_scroll_to_end
  6. Stop and start the configuration and click "Scroll to end" again to see how it should work for comparison. clion_scroll_to_end

I've included an example project with a run configuration ready to go: https://drive.google.com/file/d/14kMig1RHE0neluOtWtXvbS_GGbiKnehh/view?usp=sharing Here's the code from the project in case there is an issue with the link:

use std::thread;
use std::time;

// Make sure to install Cargo Watch
// cargo install cargo-watch

// Run configuration command should be:
// watch -x "run"

fn main() {
    // Print out some spam to show if the console is scrolling or not.
    // Imagine this is a web server logging page loads debug info etc.
    loop {
        println!("Hello, world!");
        thread::sleep(time::Duration::from_millis(200))

        // 1. Once it is running, uncomment the panic below and hit ctrl+s to save the change.
        //    This simulates making changes to your code but making a mistake.
        // 2. Cargo watch will re-run and show an error, stopping the console
        //    from scrolling, which is fine.
        // 3. Now comment out the panic again and save so it will rebuild.
        // 4. Note that clicking "scroll to end" no longer keeps scrolling,
        //    it only jumps to the end temporarily.
        // 5. Stop and start the configuration again and try scroll to end to see how it should work.

        // panic!();
    }
}

paul-hansen avatar May 03 '20 04:05 paul-hansen

Closing this as it will probably never see any attention. There are other issues I'd rather see attention given anyway.

paul-hansen avatar Jun 04 '22 01:06 paul-hansen

This keeps happening, and currently the only way to have this functionality is to rather use the terminal than the run window.

I think this issue should be re-opened.

aragalie avatar Apr 07 '23 13:04 aragalie

This keeps happening, and currently the only way to have this functionality is to rather use the terminal than the run window.

I think this issue should be re-opened.

Is it possible to customize this button for running that command on terminal instead of run window? image

Geo-W avatar Apr 22 '23 04:04 Geo-W

The same issue applies to CLion's CMake view with the same buttons (probably underlying code is the same)

xahon avatar Aug 29 '23 13:08 xahon