Thread: [Dev-C++] Debugsession does not open a console window
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Frank W. <F.W...@wi...> - 2007-04-13 13:25:27
|
Hi, I wrote a little program that parses a textfile. This is a console = application and if I start with the run button within DEV-C++ all things = look good. But if I try to use the debugger and step trough my app no = console window will be opend for in and output. What might I do wrong, what can I do to solve this? Thanks in advance Frank WIKA Alexander Wiegand GmbH & Co. KG=20 Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany=20 Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA = 1819=20 Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenber= g -=20 Amtsgericht Aschaffenburg HRB 306=20 Gesch=E4ftsf=FChrer: Alexander Wiegand=20 Telefon: (09372) 132-0=20 Internet: www.wika.com=20 ---------------------------------------------------------------------------= --------------------- The information contained in this E-mail and any attached files are = strictly=20 confidential and may be subject to legal privilege. If you are not the=20 intended recipient, his representative or the person responsible for = delivering=20 the message to the intended recipient, be advised that you have received = this=20 message in error and that any dissemination, copying or use of this = message=20 or attachment is strictly forbidden, as is the disclosure of the informatio= n=20 therein. If you have received this E-mail in error, please notify us = immediately=20 by E-mail or telephone and delete this message and all its attachments=20 subsequently. All reasonable precautions have been taken to ensure no=20 viruses are present in this E-mail.=20 ---------------------------------------------------------------------------= ---------------------=20 =20 |
|
From: Frank W. <F.W...@wi...> - 2007-04-16 07:59:49
|
Hi again,
and thanks to churin for his reply, but I still get the problem.
For a little more information my code looks like this:
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
char zeichen, endchar;
int line =3D 1, ans, mess, conf, mode, ANA_SW;
main()
{
string infilename;
ifstream infile;
=09
cout << "Dateiname? " << flush;
cin >> infilename;
infile.open(infilename.c_str(), ios::binary | ios::in);
while(infile.get(zeichen))
{
......so something=20
}
}
At normal execution at the line cout << ... a console window opens but not =
in debug mode.
I set breakpoints to at this line and at lines before and steped through =
the code in single step mode but when I reach the cout, cin line no =
console window appear so I'm not able to input a infilename.
I can't imagine where the problem is, maybe someone has a hint to look at.
Greetings
Frank
WIKA Alexander Wiegand GmbH & Co. KG=20
Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany=20
Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA =
1819=20
Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenber=
g -=20
Amtsgericht Aschaffenburg HRB 306=20
Gesch=E4ftsf=FChrer: Alexander Wiegand=20
Telefon: (09372) 132-0=20
Internet: www.wika.com=20
---------------------------------------------------------------------------=
---------------------
The information contained in this E-mail and any attached files are =
strictly=20
confidential and may be subject to legal privilege. If you are not the=20
intended recipient, his representative or the person responsible for =
delivering=20
the message to the intended recipient, be advised that you have received =
this=20
message in error and that any dissemination, copying or use of this =
message=20
or attachment is strictly forbidden, as is the disclosure of the informatio=
n=20
therein. If you have received this E-mail in error, please notify us =
immediately=20
by E-mail or telephone and delete this message and all its attachments=20
subsequently. All reasonable precautions have been taken to ensure no=20
viruses are present in this E-mail.=20
---------------------------------------------------------------------------=
---------------------=20
=20
|
|
From: Per W. <pw...@ia...> - 2007-04-16 08:30:59
|
The console window have nothing to do with your use of cout or printf() or
similar. The console window is caused by one of the settings to the
linker. Alas, I don't have Dev-C++ available right now, to check exactly
which setting it is.
If I remember correctly, you have something like --subsystem,console or
something like that to specify to the linker that it should create a
console.
If you play around a bit, you can also manage the reverse, i.e. getting a
graphical application that also have a console.
/pwm
On Mon, 16 Apr 2007, Frank Wagner wrote:
> Hi again,
>
> and thanks to churin for his reply, but I still get the problem.
>
> For a little more information my code looks like this:
>
> #include <string>
> #include <fstream>
> #include <iostream>
>
> using namespace std;
>
> char zeichen, endchar;
> int line =3D 1, ans, mess, conf, mode, ANA_SW;
> main()
> {
> string=09infilename;
> =09ifstream infile;
>
> =09cout << "Dateiname? " << flush;
> =09cin >> infilename;
> =09infile.open(infilename.c_str(), ios::binary | ios::in);
> =09while(infile.get(zeichen))
> =09{
> ......so something
> }
>
> }
>
> At normal execution at the line cout << ... a console window opens but no=
t in debug mode.
> I set breakpoints to at this line and at lines before and steped through =
the code in single step mode but when I reach the cout, cin line no console=
window appear so I'm not able to input a infilename.
>
> I can't imagine where the problem is, maybe someone has a hint to look at=
=2E
>
> Greetings
>
> Frank
>
>
> WIKA Alexander Wiegand GmbH & Co. KG
> Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany
> Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA 1=
819
> Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenb=
erg -
> Amtsgericht Aschaffenburg HRB 306
> Gesch=E4ftsf=FChrer: Alexander Wiegand
> Telefon: (09372) 132-0
> Internet: www.wika.com
> -------------------------------------------------------------------------=
-----------------------
> The information contained in this E-mail and any attached files are stric=
tly
> confidential and may be subject to legal privilege. If you are not the
> intended recipient, his representative or the person responsible for deli=
vering
> the message to the intended recipient, be advised that you have received =
this
> message in error and that any dissemination, copying or use of this messa=
ge
> or attachment is strictly forbidden, as is the disclosure of the informat=
ion
> therein. If you have received this E-mail in error, please notify us imme=
diately
> by E-mail or telephone and delete this message and all its attachments
> subsequently. All reasonable precautions have been taken to ensure no
> viruses are present in this E-mail.
> -------------------------------------------------------------------------=
-----------------------
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Frank W. <F.W...@wi...> - 2007-04-16 12:49:02
|
Hi,
first thanks for your fast reply.
Yes, I can remember that as I tried this a long time ago a console window =
opens without any problems just the time I started the debug session. I =
compiled and debuged my program using CodeBlocks and after I started the =
debug session the console window opens.
I cant find some option that type Per Westermark wrote about in his mail.
There is a option in Dev-C++ named "Dont open a console window". But if I =
set this to yes the console window won't open also in normal execution and =
has nothing to do with debugging.
I don't know what I still can do to get the console window in debugging =
mode and what has been changed in Dev-C++ because I remember in former =
versions it woked like I expeceted.
Thanks in advance
Frank
>>> Per Westermark <pw...@ia...> 04/16/07 10:30 >>>
The console window have nothing to do with your use of cout or printf() or
similar. The console window is caused by one of the settings to the
linker. Alas, I don't have Dev-C++ available right now, to check exactly
which setting it is.
If I remember correctly, you have something like --subsystem,console or
something like that to specify to the linker that it should create a
console.
If you play around a bit, you can also manage the reverse, i.e. getting a
graphical application that also have a console.
/pwm
On Mon, 16 Apr 2007, Frank Wagner wrote:
> Hi again,
>
> and thanks to churin for his reply, but I still get the problem.
>
> For a little more information my code looks like this:
>
> #include <string>
> #include <fstream>
> #include <iostream>
>
> using namespace std;
>
> char zeichen, endchar;
> int line =3D 1, ans, mess, conf, mode, ANA_SW;
> main()
> {
> string infilename;
> ifstream infile;
>
> cout << "Dateiname? " << flush;
> cin >> infilename;
> infile.open(infilename.c_str(), ios::binary | ios::in);
> while(infile.get(zeichen))
> {
> ......so something
> }
>
> }
>
> At normal execution at the line cout << ... a console window opens but =
not in debug mode.
> I set breakpoints to at this line and at lines before and steped through =
the code in single step mode but when I reach the cout, cin line no =
console window appear so I'm not able to input a infilename.
>
> I can't imagine where the problem is, maybe someone has a hint to look =
at.
>
> Greetings
>
> Frank
>
>
> WIKA Alexander Wiegand GmbH & Co. KG
> Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany
> Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA =
1819
> Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz =
Klingenberg -
> Amtsgericht Aschaffenburg HRB 306
> Gesch=E4ftsf=FChrer: Alexander Wiegand
> Telefon: (09372) 132-0
> Internet: www.wika.com=20
> -------------------------------------------------------------------------=
-----------------------
> The information contained in this E-mail and any attached files are =
strictly
> confidential and may be subject to legal privilege. If you are not the
> intended recipient, his representative or the person responsible for =
delivering
> the message to the intended recipient, be advised that you have received =
this
> message in error and that any dissemination, copying or use of this =
message
> or attachment is strictly forbidden, as is the disclosure of the =
information
> therein. If you have received this E-mail in error, please notify us =
immediately
> by E-mail or telephone and delete this message and all its attachments
> subsequently. All reasonable precautions have been taken to ensure no
> viruses are present in this E-mail.
> -------------------------------------------------------------------------=
-----------------------
>
>
>
> -------------------------------------------------------------------------=
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/=20
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...=20
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm=20
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20
>
WIKA Alexander Wiegand GmbH & Co. KG=20
Alexander-Wiegand-Stra=DFe 30 - 63911 Klingenberg - Germany=20
Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA =
1819=20
Komplement=E4rin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenber=
g -=20
Amtsgericht Aschaffenburg HRB 306=20
Gesch=E4ftsf=FChrer: Alexander Wiegand=20
Telefon: (09372) 132-0=20
Internet: www.wika.com=20
---------------------------------------------------------------------------=
---------------------
The information contained in this E-mail and any attached files are =
strictly=20
confidential and may be subject to legal privilege. If you are not the=20
intended recipient, his representative or the person responsible for =
delivering=20
the message to the intended recipient, be advised that you have received =
this=20
message in error and that any dissemination, copying or use of this =
message=20
or attachment is strictly forbidden, as is the disclosure of the informatio=
n=20
therein. If you have received this E-mail in error, please notify us =
immediately=20
by E-mail or telephone and delete this message and all its attachments=20
subsequently. All reasonable precautions have been taken to ensure no=20
viruses are present in this E-mail.=20
---------------------------------------------------------------------------=
---------------------=20
=20
|
|
From: Roger F. <ra...@ha...> - 2007-04-16 23:06:25
|
Aloha from honolulu,
My notes say you need to use the project options and set them for the
Win32 Console. This will happen automatically if you open a new project
as a Console Application. I've found that to be the easiest way.
Simply start a new project as a Console Application and add your code
file to the project.
Aloha,
Roger
Frank Wagner wrote:
> Hi,
>
> first thanks for your fast reply.
>
> Yes, I can remember that as I tried this a long time ago a console window opens without any problems just the time I started the debug session. I compiled and debuged my program using CodeBlocks and after I started the debug session the console window opens.
>
> I cant find some option that type Per Westermark wrote about in his mail.
> There is a option in Dev-C++ named "Dont open a console window". But if I set this to yes the console window won't open also in normal execution and has nothing to do with debugging.
>
> I don't know what I still can do to get the console window in debugging mode and what has been changed in Dev-C++ because I remember in former versions it woked like I expeceted.
>
> Thanks in advance
>
>
> Frank
>
>
>>>>Per Westermark <pw...@ia...> 04/16/07 10:30 >>>
>
> The console window have nothing to do with your use of cout or printf() or
> similar. The console window is caused by one of the settings to the
> linker. Alas, I don't have Dev-C++ available right now, to check exactly
> which setting it is.
>
> If I remember correctly, you have something like --subsystem,console or
> something like that to specify to the linker that it should create a
> console.
>
> If you play around a bit, you can also manage the reverse, i.e. getting a
> graphical application that also have a console.
>
> /pwm
>
> On Mon, 16 Apr 2007, Frank Wagner wrote:
>
>
>>Hi again,
>>
>>and thanks to churin for his reply, but I still get the problem.
>>
>>For a little more information my code looks like this:
>>
>>#include <string>
>>#include <fstream>
>>#include <iostream>
>>
>>using namespace std;
>>
>>char zeichen, endchar;
>>int line = 1, ans, mess, conf, mode, ANA_SW;
>>main()
>>{
>> string infilename;
>> ifstream infile;
>>
>> cout << "Dateiname? " << flush;
>> cin >> infilename;
>> infile.open(infilename.c_str(), ios::binary | ios::in);
>> while(infile.get(zeichen))
>> {
>> ......so something
>> }
>>
>>}
>>
>>At normal execution at the line cout << ... a console window opens but not in debug mode.
>>I set breakpoints to at this line and at lines before and steped through the code in single step mode but when I reach the cout, cin line no console window appear so I'm not able to input a infilename.
>>
>>I can't imagine where the problem is, maybe someone has a hint to look at.
>>
>>Greetings
>>
>>Frank
>>
>>
>>WIKA Alexander Wiegand GmbH & Co. KG
>>Alexander-Wiegand-Straße 30 - 63911 Klingenberg - Germany
>>Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA 1819
>>Komplementärin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenberg -
>>Amtsgericht Aschaffenburg HRB 306
>>Geschäftsführer: Alexander Wiegand
>>Telefon: (09372) 132-0
>>Internet: www.wika.com
>>------------------------------------------------------------------------------------------------
>>The information contained in this E-mail and any attached files are strictly
>>confidential and may be subject to legal privilege. If you are not the
>>intended recipient, his representative or the person responsible for delivering
>>the message to the intended recipient, be advised that you have received this
>>message in error and that any dissemination, copying or use of this message
>>or attachment is strictly forbidden, as is the disclosure of the information
>>therein. If you have received this E-mail in error, please notify us immediately
>>by E-mail or telephone and delete this message and all its attachments
>>subsequently. All reasonable precautions have been taken to ensure no
>>viruses are present in this E-mail.
>>------------------------------------------------------------------------------------------------
>>
>>
>>
>>-------------------------------------------------------------------------
>>This SF.net email is sponsored by DB2 Express
>>Download DB2 Express C - the FREE version of DB2 express and take
>>control of your XML. No limits. Just data. Click to get it now.
>>http://sourceforge.net/powerbar/db2/
>>_______________________________________________
>>Dev-cpp-users mailing list
>>Dev...@li...
>>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>
>
>
>
>
> WIKA Alexander Wiegand GmbH & Co. KG
> Alexander-Wiegand-Straße 30 - 63911 Klingenberg - Germany
> Kommanditgesellschaft: Sitz Klingenberg - Amtsgericht Aschaffenburg HRA 1819
> Komplementärin: WIKA Alexander Wiegand Verwaltungs GmbH - Sitz Klingenberg -
> Amtsgericht Aschaffenburg HRB 306
> Geschäftsführer: Alexander Wiegand
> Telefon: (09372) 132-0
> Internet: www.wika.com
> ------------------------------------------------------------------------------------------------
> The information contained in this E-mail and any attached files are strictly
> confidential and may be subject to legal privilege. If you are not the
> intended recipient, his representative or the person responsible for delivering
> the message to the intended recipient, be advised that you have received this
> message in error and that any dissemination, copying or use of this message
> or attachment is strictly forbidden, as is the disclosure of the information
> therein. If you have received this E-mail in error, please notify us immediately
> by E-mail or telephone and delete this message and all its attachments
> subsequently. All reasonable precautions have been taken to ensure no
> viruses are present in this E-mail.
> ------------------------------------------------------------------------------------------------
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|