if the query has already been parsed before you started tracing, you won't see it.
for example:
variable x refcursor
set serveroutput off
declare
l_rec all_users%rowtype;
begin
open :x for 'select * from all_users BEFORE where user_id > :x' using 1;
fetch :x into l_rec;
end;
/
alter session set events '10046 trace name context forever, level 12';
print x
exec open :x for 'select * from all_users AFTER where user_id > :x' using 100000;
print x
column trace new_val TRACE
select c.value || '/' || d.instance_name || '_ora_' || a.spid || '.trc' trace
from v$process a, v$session b, v$parameter c, v$instance d
where a.addr = b.paddr
and b.audsid = userenv('sessionid')
and c.name = 'user_dump_dest'
/
connect /
!vi &TRACE
will produce a trace file like this:
*** 2009-07-16 13:50:39.724
*** SESSION ID:(136.6231) 2009-07-16 13:50:39.724
*** CLIENT ID:() 2009-07-16 13:50:39.724
*** SERVICE NAME:(SYS$USERS) 2009-07-16 13:50:39.724
*** MODULE NAME:(SQL*Plus) 2009-07-16 13:50:39.724
*** ACTION NAME:() 2009-07-16 13:50:39.724
WAIT #4: nam='SQL*Net message to client' ela= 4 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639714556
WAIT #4: nam='SQL*Net message from client' ela= 1347 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639726155
CLOSE #4:c=0,e=0,dep=0,type=1,tim=1247766639724572
WAIT #3: nam='SQL*Net message to client' ela= 3 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639726299
=====================
PARSING IN CURSOR #3 len=49 dep=0 uid=171 oct=3 lid=171 tim=1247766639724572 hv=733528349 ad='52636f30' sqlid='3ss3vnnpvjh8x'
select * from all_users BEFORE where user_id > :x
END OF STMT
FETCH #3:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=1,plh=3413134360,tim=1247766639724572
WAIT #3: nam='SQL*Net message from client' ela= 3601 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639730055
WAIT #3: nam='SQL*Net message to client' ela= 1 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639730107
FETCH #3:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=1,plh=3413134360,tim=1247766639724572
WAIT #3: nam='SQL*Net message from client' ela= 2492 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639732667
WAIT #3: nam='SQL*Net message to client' ela= 4 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639732807
FETCH #3:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=15,dep=0,og=1,plh=3413134360,tim=1247766639724572
WAIT #3: nam='SQL*Net message from client' ela= 3412 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639736320
WAIT #3: nam='SQL*Net message to client' ela= 3 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639736455
FETCH #3:c=1000,e=0,p=0,cr=19,cu=0,mis=0,r=2,dep=0,og=1,plh=3413134360,tim=1247766639735695
WAIT #3: nam='SQL*Net message from client' ela= 1623 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639738689
CLOSE #3:c=0,e=0,dep=0,type=0,tim=1247766639735695
=====================
PARSING IN CURSOR #4 len=89 dep=0 uid=171 oct=47 lid=171 tim=1247766639735695 hv=3039451362 ad='525f9bbc' sqlid='6834dfauknq72'
BEGIN open :x for 'select * from all_users AFTER where user_id > :x' using 100000; END;
END OF STMT
PARSE #4:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=0,tim=1247766639735695
BINDS #4:
Bind#0
oacdty=102 mxl=04(04) mxlc=00 mal=00 scl=00 pre=00
oacflg=01 fl2=1000000 frm=00 csi=00 siz=4 off=0
kxsbbbfp=b79eebd4 bln=04 avl=04 flg=05
value=
Dump of memory from 0xB79EEBD4 to 0xB79EEBD8
B79EEBD0 00000000 [....]
=====================
PARSING IN CURSOR #3 len=48 dep=1 uid=171 oct=3 lid=171 tim=1247766639735695 hv=4150464802 ad='52441f2c' sqlid='6t9qs8bvq6492'
select * from all_users AFTER where user_id > :x
END OF STMT
PARSE #3:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3413134360,tim=1247766639735695
BINDS #3:
Bind#0
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=206001 frm=00 csi=00 siz=24 off=0
kxsbbbfp=b79f3f8c bln=22 avl=02 flg=05
value=100000
EXEC #3:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=1,plh=3413134360,tim=1247766639735695
WAIT #4: nam='SQL*Net message to client' ela= 5 driver id=1650815232 # bytes=1 p3=0 obj#=-1 tim=1247766639740086
EXEC #4:c=1000,e=0,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=1247766639735695
notice the parsing in cursor #3 the first time - it is misleading. The cursor was already parsed, the tim= on that is wrong - it was not parsed at that tim=, we know it was parsed well before that because we parsed and fetched from it before the trace was enabled.