473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Debugging asynchronous app

My app calls another app asynchronously. How do I debug into the called app?
Nov 16 '05 #1
2 2132
Hi Rathtap,

You might wanna look into the "Thread Window" of the Debug Windows to get a
grab on the multiple threads spawning asynchronously.

Also if i am correct , u need the pdb and the exe of the application you are
spawning OR you need to have the other app running in debug mode to debug
that application when you call it.

Hope it helps

Thank You,
rawCoder

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
My app calls another app asynchronously. How do I debug into the called

app?
Nov 16 '05 #2
"rawCoder" <ra******@hotmail.com> wrote in message news:<ev**************@TK2MSFTNGP10.phx.gbl>...
Hi Rathtap,

You might wanna look into the "Thread Window" of the Debug Windows to get a
grab on the multiple threads spawning asynchronously.

Also if i am correct , u need the pdb and the exe of the application you are
spawning OR you need to have the other app running in debug mode to debug
that application when you call it.

Hope it helps

Thank You,
rawCoder

Visual Studio will not let me run two apps in debug mode at the same
time. What I am trying to do is asynchronously kick off a console app
from a web page. Asynchronously so that I can display a wait window.
I am unable to debug through one app to the other.
Also, in the calling app, while debugging, the debugger does not
always step into the Delegate when I invoke BeginInvoke and when it
does, it doesn't step through each line of code in the function
RunProcess but steps right out and back to the next line in
btnImport_Click:
Code snippet:
//Declarations
delegate string ShowProgressDelegate(string cmd);

private void btnImport_Click(object sender, System.EventArgs e)
{
string command=txtFileToImport.Text;
ShowProgressDelegate showProgress = new
ShowProgressDelegate(RunProcess);
IAsyncResult ar = showProgress.BeginInvoke( command, null, null);
Session["Finished"]=false;
Response.Redirect("wait.aspx",false);
}

private string RunProcess(string cmd)
{
try
{
String username = System.Security.Principal.WindowsIdentity.GetCurre nt().Name;
System.Security.Principal.WindowsImpersonationCont ext
impersonationContext;
impersonationContext =
((System.Security.Principal.WindowsIdentity)User.I dentity).Impersonate();
Session["Finished"]=false;
System.Diagnostics.Process p;
p= new System.Diagnostics.Process();
p.StartInfo.FileName= Server.MapPath("\\AccountApp") +
"\\Importer\\bin\\Debug\\Importer.exe";
p.StartInfo.Arguments=cmd;
p.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;
p.Start();
string output= p.StandardOutput.ReadToEnd();
p.WaitForExit();
p.Close();
Session["Finished"]=true;
impersonationContext.Undo();
lblNotify.Text="File Imported";
Session["ImportData"]=output;
return output;
}
catch(Exception ex)
{
lblNotify.Text=ex.Message;
Session["Finished"]=true;
}
return string.Empty;
}
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: ... | last post by:
Does anyone know a good tutorial on asynchronous programming in .net AsyncCallback And IASyncResult are driving me crazy. And the msdn documentation is not really helpful on this topic I...
2
by: Leo | last post by:
Version 7 fixpack 9, aix 5.1 In our database we have a table that that has a dedicated bufferpool for the data, and another for indexes. Actually we have three of these combinations and they...
1
by: Natalia DeBow | last post by:
Hi, I am working on a Windows-based client-server application. I am involved in the development of the remote client modules. I am using asynchronous delegates to obtain information from...
1
by: Julian Hershel | last post by:
Reading about asynchronous programming (ms-help://MS.NETFrameworkSDK/cpguidenf/html/cpconasynchronousdesignpatterno verview.htm) I could not clarify some doubts. Hope you can help me. 1) Are...
3
by: usenetaccount | last post by:
In a newly created test app, to maximize client performance I tried to make two SOAP method calls in tandem (the soap methods execute some specified query), as each call includes a large amount of...
1
by: dba123 | last post by:
I need to perform Asynchronous Inserts using DAAB. So far I have a method which does an insert but how can I do this Asyncronously so that it does not affect the load on our public production...
0
by: Bishoy George | last post by:
Hi, I have a asp.net 2.0 web application. I want to implement the asynchronous model through http handler in web.config ...
4
by: Morgan Cheng | last post by:
Since ASP.NET 2.0, asynchronous web service client can be implemented with event-based pattern, instead of original BeginXXX/EndXXX pattern. However, I didn't find any material about event-based...
2
by: Nicolas Le Gland | last post by:
Hello everyone here. This is my first post in this newsgroup, I hope I won't be to much off-topic. Feel free to redirect me to any better group. I am getting strange timing issues when...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.