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 6577879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:41:46+00:00 2026-05-25T15:41:46+00:00

I have the following code: namespace { void Foo() { } } namespace Bar

  • 0

I have the following code:

namespace
{
    void Foo()
    {
    }
}

namespace Bar
{
    void Foo()
    {
    }
}

int main()
{
    Foo();
    Bar::Foo();

    return 0;
}

I want to put breakpoint on Foo() inside anonymous namespace by name (Ctrl+B key binding). I can do it for function inside named namespace Bar with no problem by name Bar::Foo. I tried anonymous namespace::Foo for anonymous namespace but VS fails to parse this name, i guess because of whitespace character in name. Also I tried to put different quotation marks but with no luck. Is it possible at all to put this breakpoint?

  • 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-05-25T15:41:47+00:00Added an answer on May 25, 2026 at 3:41 pm

    I encountered a similar problem a long time ago (Debugging data in 'anynomous namespaces' (C++)). I wanted to look at the value of a data member in an unnamed namespace, but I couldn’t get this done.

    Finally, somebody pointed me to http://msdn.microsoft.com/en-us/library/0888kc6a%28VS.80%29.aspx. Maybe you can get the decorated function name and put a breakpoint on that.

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

Sidebar

Related Questions

I have the following code snippet: void foo(double a) {} namespace bar_space { struct
i have following code for heapsort #include <iostream> using namespace std; void exch(int a[],int
I have the following code: // IMyInterface.cs namespace InterfaceNamespace { interface IMyInterface { void
So I have the following the code: namespace ConsoleApplication1 { public delegate int Transformer(int
I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I had the following code, which was basically, class foo { public: void method();
i have following code #include <iostream> #include <set> #include <string> using namespace std; template<class
I have the following code: #include <iostream> using namespace std; template <class T> class
I have the following code using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; namespace
i have following code,which does not show me anything #include <iostream> using namespace std;

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.