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

  • Home
  • SEARCH
  • 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 9225785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:39:59+00:00 2026-06-18T04:39:59+00:00

The following code behaves strange and I try to understand why: NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080); EmbeddableDocumentStore db

  • 0

The following code behaves strange and I try to understand why:

NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(8080);
EmbeddableDocumentStore db = new EmbeddableDocumentStore();
db.DataDirectory = @"C:\Google Drive\TradingFramework\RavenDatabase\";
db.UseEmbeddedHttpServer = true;
db.Initialize();

bool halt = true;

Console.WriteLine("Read to try server");
Console.ReadLine();

The code above “bool halt” initializes a RavenDB database but I it is irrelevant what it does for the purpose of this question. I ran 2 scenarios:

  • a) put a break point in Debug mode within VS2012 at the line bool halt = true;. At that point I am supposed to be having access to a created web server listening on localhost:8080. That is not the case. Even putting a wait loop into the code before the break points does not make a difference, nor does a Thread.Sleep(xxx).

  • b) I removed the breakpoint and code execution halts and waits for user input at line Console.ReadLine();. In this case the server at localhost:8080 responds and works just fine.

Why is that the case? Why is something not executing when I set a break point vs Console.Readline()? Please note I am strictly just testing/developing but I try to understand what difference it makes? I was always under the impression a) and b) is one and the same, it interrupts code execution.

  • 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-18T04:40:01+00:00Added an answer on June 18, 2026 at 4:40 am

    Console.Readline() doesn’t break execution, it just waits for input from the user. Other threads in the application continue to run as normal.

    A break-point actually stops execution to allow you to look at the state of the application. In this state all threads a paused so there’s nothing to respond to port 8080.

    You could open a command prompt and type nestat -a, in which case you should see in either scenario that there’s a process listening on port 8080.

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

Sidebar

Related Questions

I can't understand why the following code behaves a particular way, which is described
The following simple code in Java behaves somewhat in a strange way that I
following code behaves strange (at least for me): int testValue = 1234; this.ConversionTest( testValue
I don't understand why the following code behaves the way it does. import numpy
I'm curious to know why the following code behaves differently? The following does not
The following code behaves differently depending on if I use the 32 or 64
When I execute following code in scala REPL console: java.util.Collections.max(new java.util.ArrayList[String]()) NoSuchMethodError exception is
Whilst on my local machine the following code behaves perfectly. @Html.Raw(SquishIt.Framework.Bundle.Css() .Add(~/css/normalize.css) .Add(~/css/nonsemantic.css) .Add(~/css/custom/basic/site.css)
I'm using Google Chrome 16.0.912.63 and have the following code: __defineGetter__('x', function(){ console.log('In Getter:
Namely, how does the following code: var sup = new Array(5); sup[0] = 'z3ero';

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.