Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. debug

debug

Scheduled Pinned Locked Moved ASP.NET
debugging
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ramkumar_S
    wrote on last edited by
    #1

    Hi All public void sample(string s) { string k = s+"test"; return k; } This is my function in App_code/Test.cs I want to give one vale like sample(ram) and test whether it returns correct value. I know about the breakpoint ... I want to know whether in immediate window or in watch window ,is it possible to check the value ....so that it will be helpfull for me while coding Thanks

    Ramkumar

    A 1 Reply Last reply
    0
    • R Ramkumar_S

      Hi All public void sample(string s) { string k = s+"test"; return k; } This is my function in App_code/Test.cs I want to give one vale like sample(ram) and test whether it returns correct value. I know about the breakpoint ... I want to know whether in immediate window or in watch window ,is it possible to check the value ....so that it will be helpfull for me while coding Thanks

      Ramkumar

      A Offline
      A Offline
      Arindam Sinha
      wrote on last edited by
      #2

      Use the following code in the Immediate Window -

      ?sample("test")

      You might need to append the class name infront of the method. You can get the details here[^].

      Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

      R 1 Reply Last reply
      0
      • A Arindam Sinha

        Use the following code in the Immediate Window -

        ?sample("test")

        You might need to append the class name infront of the method. You can get the details here[^].

        Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

        R Offline
        R Offline
        Ramkumar_S
        wrote on last edited by
        #3

        Thanks ...but i am getting this error..remember i am coding in class file The expression cannot be evaluated while in design mode. ?sample("fsdf") The expression cannot be evaluated while in run mode. Please help

        Ramkumar

        A 1 Reply Last reply
        0
        • R Ramkumar_S

          Thanks ...but i am getting this error..remember i am coding in class file The expression cannot be evaluated while in design mode. ?sample("fsdf") The expression cannot be evaluated while in run mode. Please help

          Ramkumar

          A Offline
          A Offline
          Arindam Sinha
          wrote on last edited by
          #4

          getramonweb wrote:

          The expression cannot be evaluated while in design mode. ?sample("fsdf") The expression cannot be evaluated while in run mode.

          I created the following class with your method (your sample method would give compilation error) -

          namespace MyNameSpace
          {
          public class MyClass
          {
          public static string sample(string s)
          {
          string k = s + "test";
          return k;
          }

          }
          

          }

          Then I used the following commands in the immediate window to get the result (check that I used static method) -

          ?MyNameSpace.MyClass.sample("Arindam");

          I think you need to read this[^] carefully. Mainly go through the multiple project section as you have to select the project as startup project. Also this link tells about some limitations.

          Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

          R 1 Reply Last reply
          0
          • A Arindam Sinha

            getramonweb wrote:

            The expression cannot be evaluated while in design mode. ?sample("fsdf") The expression cannot be evaluated while in run mode.

            I created the following class with your method (your sample method would give compilation error) -

            namespace MyNameSpace
            {
            public class MyClass
            {
            public static string sample(string s)
            {
            string k = s + "test";
            return k;
            }

            }
            

            }

            Then I used the following commands in the immediate window to get the result (check that I used static method) -

            ?MyNameSpace.MyClass.sample("Arindam");

            I think you need to read this[^] carefully. Mainly go through the multiple project section as you have to select the project as startup project. Also this link tells about some limitations.

            Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

            R Offline
            R Offline
            Ramkumar_S
            wrote on last edited by
            #5

            thanks,, sorry for disturbing again and again I just copy past the code ,but i got same error...can u plz guid me where i am going wrong ?MyNameSpace.MyClass.sample("Arindam"); The expression cannot be evaluated while in design mode.

            Ramkumar

            A 1 Reply Last reply
            0
            • R Ramkumar_S

              thanks,, sorry for disturbing again and again I just copy past the code ,but i got same error...can u plz guid me where i am going wrong ?MyNameSpace.MyClass.sample("Arindam"); The expression cannot be evaluated while in design mode.

              Ramkumar

              A Offline
              A Offline
              Arindam Sinha
              wrote on last edited by
              #6

              You are not disturbing anyone :) It's my pleasure to solve (if any :laugh: ) issues. Did you select the project as startup project where you place this MyClass? I have quoted the section from the MSDN[^] Design Time Expression Evaluation in Multi-Project Solutions When establishing the context for design time expression evaluation, Visual Studio references the currently selected project in Solution Explorer. If no project is selected in Solution Explorer, Visual Studio attempts to evaluate the function against the startup project. If the function cannot be evaluated in the current context, you will receive an error message. If you are attempting to evaluate a function in a project that is not the startup project for the solution and you receive an error, try selecting the project in Solution Explorer and attempt the evaluation again.

              Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups