User forums > Nightly builds

The 14 April 2012 build (7932) is out.

<< < (10/22) > >>

hooluupog:

--- Quote from: oBFusCATed on April 23, 2012, 04:23:16 pm ---hooluupog: Read few post about about "set print elements"

--- End quote ---
Thanks for your reply. I tried again,when I delete all watches and it works well. But after i added "out"  or "in" into watches the codeblocks freezed when runing into that line(see my code in #43).

oBFusCATed:
Hm, I've should written "above about" not "about about".

I don't know what #43 and I don't know how to answer you.

hooluupog:

--- Quote from: oBFusCATed on April 23, 2012, 04:48:29 pm ---Hm, I've should written "above about" not "about about".

I don't know what #43 and I don't know how to answer you.

--- End quote ---
Sorry for my poor english. My code is as follows:

--- Code: --- std::vector<_int> out;
  std::vector<_int> in;
  in.resize(num.length());
  for(;i<num.length();++i)        // I added 'out' into watches and when debugger going into this line, codeblocks freezed 2 minutes or so before continue
                                                  debuggin next line. But it works well after i delete 'out' from watches.
  in[i] = num[i]-'0';
 out.resize(num.length());
--- End code ---
I have read gdb "set print elements", i just don't know where to do it within codeblocks.  Various info--->Print Elements --->change the value from 'ulimited' into '50', it doesn't work.

oBFusCATed:
You should put it in the initial commands of the gdb in the Settings -> Debugger.

Various info--->Print Elements  worked last time, if you provide self contained example I can try it.

hooluupog:

--- Quote from: oBFusCATed on April 23, 2012, 05:51:52 pm ---You should put it in the initial commands of the gdb in the Settings -> Debugger.

Various info--->Print Elements  worked last time, if you provide self contained example I can try it.

--- End quote ---
Ok,here is my example code.

--- Code: ---#include <vector>
#include <string>
#include <iostream>
using namespace std;
 int main()
 {
  freopen("data.in","r",stdin);//data.in is  a file with long characters(100000 chars or so)
  string s;
  cin>>s;
  vector<int> in; //if adding 'in' into watches codeblocks will freeze even if set the print limits at Various info--->Print Elements
  in.resize(s.length());
  for(int i=0;i<(int)s.length();++i)
 in[i] = s[i]-'0';
  return 0;// If nothing was added into watches, debugger would stop here with a black screen terminal.I clicked the "stop debug" button but
                //  it doesn't work. The debugger output log is "Trying to pause the running process...  Continuing..."
                // At last i have to exit my application by killing its process from windows task manager.
  }
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version