Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8249957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:43:12+00:00 2026-06-07T23:43:12+00:00

I frequently use the Scala console to evaluate and test code before I actually

  • 0

I frequently use the Scala console to evaluate and test code before I actually write it down in my project. If I want to know the contents of a variable, I can just enter it and scala evaluates it. But is there also a way to show the code of methods I entered?

I know there’s the UP-key to show single lines, but what I was searching for is to show the whole code at once.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:43:15+00:00Added an answer on June 7, 2026 at 11:43 pm

    There’s a file in your home directory named .scala_history that contains all of your recent REPL history. I regularly copy and paste code from this file into project source files. It’s not exactly the same as showing the code for individual methods in the REPL, but it might help you accomplish the same goals.

    See the comments by Paul Phillips in this issue for a discussion of some related functionality in the REPL (grouping statements in the history):

    At some point I implemented the logic for this, but the real obstacle
    is jline. It has enough trouble figuring out where the cursor is under
    the simplest conditions. Start throwing big multiline blocks into the
    history and it breaks down in tears. Would love to see this and
    SI-2547 addressed by the community.

    …

    I expect to fix this soon too, but it depends on how well the recent
    jline work goes. I implemented it long ago, and display issues are the
    impediment.

    Both of these comments are over two years old, so I wouldn’t hold your breath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In sbt 0.10.1, I frequently use test-only to narrow down the number of my
I have a function that I use quite frequently, which allows me to write
I frequently use the NSDate compare method - but I want to consider two
I am using NetBeans for PHP 6.5. In my code I frequently use the
Actually I'm always using Generic Collections and I frequently use List<>. Some scenarios I
In ruby I frequently use File.expand_path(File.dirname(__FILE__)) for loading config files or files with test
In Emacs I frequently use math symbols when I write my theory summaries of
I frequently use git stash and git stash pop to save and restore changes
I frequently use the following pattern to set an upper bound to the running
Hi I have SVN repo that I frequently use for change management. However after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.