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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:37:47+00:00 2026-05-28T04:37:47+00:00

By default, when creating a project, Visual Studio defines the Debug and Trace constants

  • 0

By default, when creating a project, Visual Studio defines the Debug and Trace constants for the debug mode, and Trace only for the release mode.

I’ve set up a bare project which just outputs two logs, one with Trace and one with Debug :

// etc.
using System.Diagnostics;

namespace DebugTrace
{
   public partial class App : Application
   {    
       // [...]

       private void Application_Launching(object sender, LaunchingEventArgs e)
       {
           Debug.WriteLine("[Debug] Application launching");
           Trace.WriteLine("[Release] Application launching");
       }

       // [...]
    }
}

Unfortunately, Visual Studio tells me that :

Error   3   The name 'Trace' does not exist in the current context  C:\Dev\WP7\DebugTrace\DebugTrace\DebugTrace\App.xaml.cs 68  7   DebugTrace

Debug is working as expected.

I’ve searched a bit, and nobody seems to have this error. The project has been just created, I didn’t touch anything, and I don’t understand why Trace is not working although TRACE constant is defined.

I’m using Visual Studio 2010 express with a Windows Phone project.

  • 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-28T04:37:48+00:00Added an answer on May 28, 2026 at 4:37 am

    I think Trace is not available for Window Phone 7. You might want to use some custom library for writing out Trace information through a WebService.

    For example take a look at this and this

    Trace in Windows Phone 7 won’t make much sense because you shouldn’t store that info on User’s phone. Instead you should pass it to a webservice which can write it out at a place where developer can get it

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

Sidebar

Related Questions

I am creating a visual studio set up project to be installed on XP,
Creating a default ASP.NET MVC project in Visual Studio sets up a basic project
When creating a new web project in Visual Studio 2010 I always forget to
I'm having trouble creating a sharepoint project with .net 4.0. Using Visual Studio 2010,
I'm programmatically creating a folder using C# and need to set the default view
In Visual Studio 2008, the target framework settings for a project are .NET Framework
Small pet peev. When creating new visual studio projects is there any way to
Is there any way to prevent Visual Studio from creating a VSMacros80 folder in
By default, Visual Studio 2008 puts the Unicode byte-order mark in front of any
I would like all my project to default to .Net 3.5 when creating a

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.