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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:24:24+00:00 2026-05-11T21:24:24+00:00

In my program I need to create sockets and bind them to listen HTTP

  • 0

In my program I need to create sockets and bind them to listen HTTP port (80). The program works fine when I launch it from command line with sudo, escalating permissions to root. Running under XCode gives a ‘permission denied’ error on the call to binding function (asio::ip::tcp::acceptor::bind()).

How can I do debugging under XCode?

All done in C++ and boost.asio on Mac OS X 10.5 with XCode 3.1.2.

  • 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-11T21:24:24+00:00Added an answer on May 11, 2026 at 9:24 pm

    Update: For Xcode 4.5 and later, see this answer instead.


    The only way I’m aware of to do what you’re asking is to run Xcode as root.

    >> sudo /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
    

    Once you’re running as root, anything processes launched from Xcode will also run as root. Note, though, that if you create or edit any files, they will be owned by root, which means that you’ll have to chown them before you can edit them as your normal user first.

    I’d love a way for Xcode to say “Launch process as root”, but as far as I know, no such functionality is available.

    Note that you can also run the application within the command-line debugger gdb to debug your application. Run

    >> sudo gdb /path/to/my/application
    

    Then you could keep Xcode open, modify at will, and debug your program within gdb. This is what I generally do.

    EDIT: Readers from the future: see the answer from Alexander Stavonin; it talks about how to do this. If you’re okay with ssh keys and enabling the root user on your system, his answer is the way to go.

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

Sidebar

Related Questions

I have a Java program and I need to create a Windows Service from
I need to create a program that receives HTTP request and forwards those requests
I need to create program that creates a XML schema like below using System.Xml.XmlSchema
I need to create a simple drawing program in c for graphs, i.e. nodes
I need to create several Raphael objects in my program. field1 and field2 are
For a school project I need to create a program and it'd be nice
I've written a program in Java (executable JAR) and need to create an installer
I want to run my client program 25,000 times. I need to create a
I need my program to create and edit a config file, which would contain
I want to create a program that produces an executable slideshow. So I need

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.